Anyone know why overflow:hidden forces an element with floated elements to wrap the elements?
I really want to understand the inner workings rather than just using
Well, seems there is no 'actual' explanation for why this happens (not one that I can understand anyway - e.g. the CSS spec excerpt provided in one of the responses simply explained that a box with floated content should not expand to wrap the floated elements - which is fine and that is logical and I completely get that)
I was hoping this wasn't some random hack that forced the parent element to wrap it's floated child elements, but it seems every resource I look at just says to use it and not why it works.
Must just be a hack.
The most useful resource I came across (or the one that gave the most detail - albeit not as much details as I needed) was from Quirksmode: http://www.quirksmode.org/css/clearing.html
Thanks if anyone else can shed light as to whether this is a random browser rendering quirk or has a logical explanation for working the way it does.
M.