Skip to content

Instantly share code, notes, and snippets.

@RossTeek
Forked from kovaldn/CSS - clearfix
Last active March 30, 2016 06:31
Show Gist options
  • Select an option

  • Save RossTeek/7a100363ad6da47e7065fe8460bdbd16 to your computer and use it in GitHub Desktop.

Select an option

Save RossTeek/7a100363ad6da47e7065fe8460bdbd16 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