Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Overflow: does not clear footer elements background, but does its content. Re: Overflow: does not clear footer elements background, but does its content.

#83633
Chris Coyier
Keymaster

The thing that you are applying overflow: hidden to wraps both the floated elements AND the footer. So the background stretches up because it’s right in there with the floated elements which are removed from the flow. Clear: both works because it’s now being cleared from those floated elements and the whole elements comes down past those. It is a little weird but it’s expected behavior. I’d wrap JUST the floated elements in the thing with overflow hidden.