philwilson.org

646

24 July, 2003

Question:

Given ten divs all with float:left one after the other (let’s call each div “box”), all inside a containing div (which we’ll call “boxholder”, they won’t be displayed as such due to the floats taking the boxes out of the normal flow.

In order to make the boxholder expand to the size of its contents, you can put another box at the end with clear:left.

Is this the only way to make the boxes sit visually within boxholder?

Screenshots of what the boxes look like without the final empty div:
IE screenshot and Mozilla screenshot

See other posts tagged with general and all posts made in July 2003.