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

Home Forums CSS Clearfix Re: Clearfix


yes, it is the same in that they both will contain the floating children. There are several ways to contain floats – the clearfix method and overflow: hidden (or auto) being two of them. Overflow: hidden; is my go to method but there are (very seldom) times when you don’t want the overflow on the parent to be hidden; and overflow: auto; could cause problems in older browsers (really not a problem any longer).

Just be aware that there are multiple ways to contain the floats and no one way is perfect 100% of the time