Forum Moderators: not2easy
I want a div to be 7 pixels in height. Works fine in Firefox and IE 7 but not in IE 6. IE 6 remains at the default height for the line - 12px or so. I've tried messing with the line-height, margin, padding, floats, relative positioning, everything... just can't seem to get it to display properly. Any ideas?
This is my CSS:
#height_bug {
background-color:#ff0000;
height:7px;
width:500px;
}
This is my markup:
<div id="height_bug"></div>
Thanks!
I believe the problem is that IE doesn't correctly handle overflow. Firefox and other browsers will let your content overflow it's boxes, but IE will automatically stretch the box to fit.
Try adding this:
overflow: hidden;
I think that will fix it.