div height error on IE6

Fabio Lee
FabioHub
Published in
1 min readFeb 29, 2008

IE6 again, “height.html” is an example code of div height error on IE6.
https://gist.github.com/fabiolee/e8cb3f6ff3af6e9c90d8542a39afa8f0.js
This code running no problem on IE7 & Firefox, but when it reach IE6, the height change to 20px.

Same case as my previous post, I look for Mr Google again. This time I get some post said:
1) IE6 height will have some white space if image is smaller then 12px, we need to set line-height to 0px.
2) IE6 height will have some white space if image is smaller then 20px, we need to set line-height to 0px & set a smaller font-size.

So, my code end up like “height_ie6_fix.html”.

Finally, it work perfectly on IE6, IE7 & Firefox browsers.

--

--