Forum Moderators: not2easy

Message Too Old, No Replies

IE 6.0 bug in CSS - Please Help!

         

cadence

6:55 pm on Jan 26, 2007 (gmt 0)

10+ Year Member



This is my first post in the forum, any help I could get on the matter would be greatly appreciated!

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!

Fotiman

7:13 pm on Jan 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As I recently posted in this thread:
[webmasterworld.com...]

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.

cadence

7:15 pm on Jan 26, 2007 (gmt 0)

10+ Year Member



Yes! Thank you so much, you're a saint!