Setting the height for a Div

For soom reason, IE seems to ignore the height property when set from a CSS class. Take this html for example. It works perfectly in Firefox, yet is still a big
band when viewed with IE.

    <style>
    
.thinbar
    
{
    
background-colordarkblue;
    
height3px;
    }
    
</style>
    <
div class="thinbar"></div>


It turns out that the font size property takes precedence over height with IE 6.  To remedy this behavior, simply add a font-size1px; property and value.
posted on Friday, January 06, 2006 10:15 AM by AlanL

Comments

# re: Setting the height for a Div

Wednesday, January 18, 2006 6:31 AM by rmansperger
IE uses a 10px height by default so you need to add the font-size: 1px; property and value to help remedy this.

This is one of the many things that continues to lead to a site or web app needing to support multiple CSS files so that things render as intended on different browsers