MAKING IE WEEP AT MY FEET
I don't usually wirte about CSS here, but man you know when something has been making you crazy for litreally years, and you finally find the solution and as you expected it is relatively simple and doesn't require some nincompoop of a ninja-style technique to make it work.
I found just such a solution.
Okay problem; when you make a menu in CSS, so the links have some rollover effect on the background. generally IE facks with your plans because it doesn't get the padding right. This is especially shitty if your links are sitting in some sort of bar where they are supposed to sit flush against the top and bottom.
So I've been approaching this shitty padding issue for years, most of what I read involved this circuitous routes around the problem, make a background image 5 times the size of your nav space and then set it to hid behind yet another div.
Or set a bunch of rules for IE that will fuck your design in firefox - but then hide those extra rules from firefox. etc.. etc..
See, I am a lazy integrator and any time I see over 1000 words explaining a solution, then it's just become a problem again.
So today, I was testing my new search strategy. Instead of using technical language for queries ("tabbed menu no image for IE7") I used a simpler question ( "padding-bottom doesn't work in IE") that actually described the problem.
Et voila I found a solution.
First off, here's what's going on in IE land.(get ready for this Jen) if you put your A tag inside a list-item, the A tag inherits the lists properties. That doesn't mean that you need to set the list to have padding because that padding will just hold your A's rules inside itself. Which means your background color will still sit inside a border from the list-items padding-rule. By that same token any padding you set on A will also live inside your lists default padding regardless of whether you set padding:0px, got it? a tricky little double bind. Padding, padding everywhere and not a bit that works,(typical of IE).
So what to do? Set your A rule to be relative.
That's it I swear. I just did it, and it worked.
Position: relative; and suddenly the A has broken free of any constraints placed on it by that nasty list item. Padding galore baby !!
Okay, back to work.
You know how long it took to read that little hint by the way 5 minutes. That's how I like to learn. quickly.
Project leader with a focus on youth and technology. Excellence in creative direction, content production, client service, and collaboration. Background in web development and interactive media.
Currently working FT as a project manager at zinc Roe: New media for kids
Oh yeah, and in my spare-time, I am an aspiring stand-up comedian.
- mirverburg: Update: Safari is now my default browser. It feels weird.
- mirverburg: Firefox 3.6.6 you are on warning. If I switch to Safari I may never go back.
- mirverburg: and lamborghinis!
- mirverburg: @Firefox - explain the lag situation please and thank you.
- mirverburg: I have the weirdest headache of all time. Like I am wearing a helmet that is a little too small for me.
- mirverburg: @SuzanneAlyssa On the radio this morning they were pretending it was Don Johnson. That would have been fun.
- mirverburg: It took three tries to get the perfect shower curtain. I think I may care too much about shower curtains.
- mirverburg: @theinterned DAMN YOU INTERNED! It's 43 here with the humidex.
- mirverburg: @theinterned the real question is: Is it 32 degrees in Whistler today?
- mirverburg: @rainnwilson Pablo Picasso was never called an asshole.
Topics
- animals (9)
- Art (2)
- books (14)
- Conferences (7)
- Design (6)
- Drupal (4)
- environmentalism (8)
- ethics (16)
- feminist-politics (20)
- funny (82)
- Gender (18)
- Girlgeeks (22)
- media_studies (11)
- Money (2)
- Music (52)
- Personal (245)
- politics (57)
- psychology (10)
- Queer (8)
- Rants (17)
- Sexuality (17)
- Shameless: For girls who get it (12)
- spirituality (8)
- Technology (42)
- Thesis (8)
- travel (8)
- TV is sometimes better then my life (3)
- Web (37)
- words (8)
- work (27)
- writing (8)
- youth_media (14)
Recent comments
- I agree with you »9 weeks 1 day ago
- Hey Mir, I think you have a »9 weeks 1 day ago
- You know I actually wondered »9 weeks 1 day ago
- To be sure, the connected, »9 weeks 1 day ago
- nice blog brother »9 weeks 2 days ago
- You are completely right. »9 weeks 6 days ago
- Long-winded and lame as »10 weeks 4 days ago
- Great post. I really enjoyed »10 weeks 6 days ago
- My clear intent in writing »13 weeks 5 days ago
- i just love you. You are »13 weeks 5 days ago


Comments