Tuesday, June 12, 2012

Resources

http://caniuse.com/

Overflow: auto

References: http://www.electrictoolbox.com/clear-float-overflow-auto/

Makes the container extend to the height of the largest child using overflow:auto. No need to use clear on the float.

A note on IE6

In order to get this to work in IE6, hasLayout needs to be triggered. This is done when the width or height of an element is set but if you do not want to set the width or height, you can instead trigger hasLayout with the proprietary Microsoft zoom CSS property like so:
.myDivWithFloatingChildrenLayers {
   overflow:auto;
   zoom: 1;
}