Created
September 20, 2012 20:26
-
-
Save amaxwell01/3758150 to your computer and use it in GitHub Desktop.
Clearing floats and fixing overflow issues. 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
// SASS CODE | |
.clearfix { | |
*zoom: 1; | |
&:before, | |
&:after { | |
content: ""; | |
display: table; | |
line-height: 0; | |
} | |
&:after { | |
clear: both; | |
} | |
} | |
// CSS ONLY CODE BELOW | |
.clearfix { | |
*zoom: 1; | |
} | |
.clearfix:before, | |
.clearfix:after | |
{ | |
content: ""; | |
display: table; | |
line-height: 0; | |
} | |
.clearfix:after { | |
clear: both; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment