Created
November 19, 2011 15:06
-
-
Save joachimdoerr/1378930 to your computer and use it in GitHub Desktop.
micro clearfix methode
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
// ----------------------------------------------------- ~ css syntax | |
.cf:before, /* for modern browsers */ | |
.cf:after { | |
content:""; | |
display:table; | |
} | |
.cf:after { | |
clear:both; | |
} | |
.cf { /* for IE6,7 */ | |
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
// ----------------------------------------------------- ~ less syntax | |
.cf () { | |
*zoom: 1; // for IE6,7 | |
&:before, // for modern browsers | |
&: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