Skip to content

Instantly share code, notes, and snippets.

@trumball
Created May 24, 2013 13:04
Show Gist options
  • Save trumball/5643352 to your computer and use it in GitHub Desktop.
Save trumball/5643352 to your computer and use it in GitHub Desktop.
Updated ClearFix From what I can tell there isn’t a major difference in rendering between this newer version and the classic version. Both of these classes will effectively clear your floats, and they should work in all modern browsers and even legacy Internet Explorer 6-8.
.clearfix:before, .container:after { content: ""; display: table; }
.clearfix:after { clear: both; }
/* IE 6/7 */
.clearfix { zoom: 1; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment