How To/webdev/

Can't set height below X px using css in Internet Explorer 6

This code would not work in IE6. Even tought height is set to 3px in ie6 div is higher!

<div style="background:red; height:3px;"></div>

and test suite (in ie6 div is higher than 3px):

To set height properly you have to also change font-size! Code below will work properly:

<div style="background:red; height:3px; font-size:0px"></div>

and test suite: