Skip to content

Instantly share code, notes, and snippets.

@zamozniewicz
Last active December 15, 2015 06:59
Show Gist options
  • Save zamozniewicz/5220363 to your computer and use it in GitHub Desktop.
Save zamozniewicz/5220363 to your computer and use it in GitHub Desktop.
Clearfix
/*
2 independent clearfix solutions for IE6+ and for IE8+
http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
http://nicolasgallagher.com/micro-clearfix-hack/
http://stackoverflow.com/questions/211383/which-method-of-clearfix-is-best
*/
/* Solution with IE8+ support */
.clearfix:after {
content: "";
display: table;
clear: both;
}
/* Alternative solution with IE6+ support */
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment