Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Float Clearing should use The New Clearfix #4

RCanine opened this Issue · 5 comments

5 participants


The problem with using overflow: hidden to clear floats is that in addition to clearing floats, it also hides overflow. So if you've got a heading that's supposed to hang just outside of your box, you've got a tough choice to make.

The New Clearfix method is a great way to clear floats in modern browsers, and falls back in IE the same way that the overflow trick does.


Not sure how I feel about browser specific CSS hacks, as that's what I set out to avoid, but I will definitely mention this.


more recent (last week) and now used by html5 boilerplate:


I don't see the point of using a bunch of code to clearfix when I can use overflow. IF I come to a situation where I can't use overflow, I'll use clearfix. But like most people, I prefer simple code over multi-line code (though mine is still not as large as the one at perishable press... 4 lines tops).


+1 for the .clearfix, works great and for practical use I have switched to only use this one (mixed the overflow: hidden and .clearfix techniques before, and if you have to refactor the code a year later or so, it's a pain in the a** because you've forgotten where you used the overflow thing and where not^^)


Fixed locally, pending commit.

@taitems taitems closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.