Saturday, March 1, 2008

div height error on IE6

IE6 again, "height.html" is an example code of div height error on IE6.

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.

No comments:

Post a Comment