Slipsnisse.se

A stupid IE solution

30th of September, 2008

If you thought that there is any other kind of solution to any IE quirk you’d be wrong.

Sorry about the lack of screenshots.
I had a problem with lists and the fact that IE rendered the list-item’s with a “Ghost Margin” at the bottom which meant that the list didn’t line up properly.
So I started to look for solutions, needless to say all other browsers behaved like expected, and tried to reduce the line-height, didn’t work.
Added zoom:1 to IE stylesheet? Didn’t work!

I few more silly things like negative margins and friends… didn’t work…

So it ended with me staring at the style for the LI in IE Developer Toolbar and noticed that the LI had a default vertical-align set to baseline.
Now why should a LI have vertical-align?
Well, I have no idea but I changed it to bottom and the problem went away. Just like that!

Not the most obvious solution but it works.

I read somewhere “I don’t know what’s going on inside IE’s rendering engine, but I bet it ain’t pretty!”. I’ll second that.

Comment
  • Mats Lindblad
  • +46 (70) 249 11 24
  • Stockholm, Sweden
  • Geo: +59° 16' 12.53", +18° 7' 26.98"