overflow: auto (or hidden ) is unacceptable, at least in cases where the container has a given height, as this gives rise to a scroll bar (or hides overflowing content).
http://jsfiddle.net/xSzcC/
In any case, floating cleaning should be carried out according to the clear rule.
Cleaning for modern browsers is very easy now .
http://jsfiddle.net/xSzcC/1/
In case of rotting the link, the functional part:
.cf:before, .cf:after { content:""; display:table; } .cf:after { clear:both; }
Explosion pills
source share