phil wilson :: a geek commodity

10:05 AM

permanent link to post  

Thursday, July 24, 2003


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