How Container Height Expand To Auto

If a parent container/wrapper is not floated but the children inside the container are floated, then the parent will not expand at it’s children expand with it’s content. In other words if you float the content within the container, the container does not increase with the content expansion.

For example:

Here is a simple solution for this problem. All you have to do it stick a clearing div after all of the content. This will force the wrapper to expand to the size of it’s content.

For example:

As long as you have this invisible clearing div, the height of the container is increased along with it’s content. Any boxes/information you place after the container/wrapper will come after the full container block as you would expect.

You may also be interested in our other articles on turn on error reporting, hotlinking protection and Pyramid free WordPress theme