Skip to content

Instantly share code, notes, and snippets.

@mejarc
Created September 26, 2012 18:37
Show Gist options
  • Save mejarc/3789732 to your computer and use it in GitHub Desktop.
Save mejarc/3789732 to your computer and use it in GitHub Desktop.
/* Thierry Koblentz's clearfix, 2010 */
.clearfix:before,
.clearfix:after {
content: ".";
display: block;
height: 0;
overflow: hidden;
}
.clearfix:after {clear: both;}
.clearfix {zoom: 1;} /* IE < 8 */
/* Nicolas Gallagher's. 2011 */
.cf:before,
.cf:after {
content: " ";
display: table;
}
.cf:after {
clear: both;
}
/**
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.cf {
*zoom: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment