CSS Tricks – Floating Div Parent Problem covering content

I can’t believe I never looked this up and have just been doing manual adjustments until now.
When floating divs, the parent container ends up with a height=0 and content underneath the divs you floated end up squashed much higher on the page.

The fix to this is to set the CSS Style for the parent container to


That solves everything! Although having to set a style to auto seems a bit reversed to me.. but oh well.

Read more: www.quirksmode.org/css/clearing.html

Leave a Reply