Created
August 16, 2012 06:54
-
-
Save maximevalette/3367505 to your computer and use it in GitHub Desktop.
CSS micro clearfix hack
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
/* For modern browsers */ | |
.cf:before, | |
.cf:after { | |
content:""; | |
display:table; | |
} | |
.cf:after { | |
clear:both; | |
} | |
/* For IE 6/7 (trigger hasLayout) */ | |
.cf { | |
*zoom:1; | |
} |
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
.cf { | |
*zoom:1; | |
&:before, &:after { | |
content:""; | |
display:table; | |
} | |
&:after { clear:both; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment