PDA

View Full Version : firefox overlaps divs *amazingly irritating*



gusblake
01-08-2006, 10:15 PM
why does firefox let floated elements NOT stretch the height of container divs? is there a fix? this has caused me no end of annoyance. tia

mwinter
01-08-2006, 10:42 PM
why does firefox let floated elements NOT stretch the height of container divs?Because it's not supposed to, and other conforming browsers (like Opera) will act the same way.

Floated elements are removed from the normal flow (like absolutely-positioned elements) so they do not affect the layout of (non-floated) block boxes. Only other floats and in-line boxes shift when encountering a float.


is there a fix?Nothing is broken (except IE), but if you need to stretch a container, you can add an element (a div, for example) with the clear property which will move it below the bottom-most float.

Mike

gusblake
01-09-2006, 01:38 AM
thanks