Last active
December 15, 2015 06:59
-
-
Save zamozniewicz/5220363 to your computer and use it in GitHub Desktop.
Clearfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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