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

Published by

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.