Nov
6

Bringing floats back into the flow

As a rule, if you place floated elements inside an unfloated element then the containing unfloated element will not expand.

If you’re having trouble getting an unfloated element to grow to the size of the floated elements it contains there is a very simple method to get it to start growing…

overflow:auto;

Assigning the above property to the containing element causes it to grow with its contents – even if the content is floated. 

Leave a comment

Sponsored links