Forum Moderators: not2easy

Message Too Old, No Replies

div not expanding for content in IE?

div IE expanding

         

surfergirl

10:07 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



I notice that sometimes my div's dont expand properly to include the content inside..only in IE. It's intermittent, meaning I can take the exact same page and 4 times out of 5 it will load fine. With the same content, sometimes a div will cut-off some of the content inside. All I have to do is refresh to have the div expand to show all the content.

Is this a known bug? Does it have a name? Is there a solution? I don't have any examples, but the divs that don't expand are outside containers, that contain lots of other divs & content inside.

-Thanks

Setek

11:33 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



Yep this is a bug in IE... I believe it's called the "Guillotine bug" because it randomly chops off content.

Usually the fixes are either adding

position: relative;
to the affected element, or
height: 100%;
(or, 10px, IE 6 will expand to suit) and it should stop cropping content.

If you're using the height method, remember to put it in an IE 6 only stylesheet/declaration, because IE 7 and standards-compliant browsers will absolutely declare the height value, whereas IE 6, as mentioned above, expands it to suit what's inside.