Skip to content

Instantly share code, notes, and snippets.

@kovaldn
Created November 28, 2014 16:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save kovaldn/c1001ceacaff23000a12 to your computer and use it in GitHub Desktop.
Save kovaldn/c1001ceacaff23000a12 to your computer and use it in GitHub Desktop.
CSS - clearfix
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
/*
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.clearfix {
*zoom: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment