Created
April 10, 2013 03:52
-
-
Save joshfitzgerald/5351666 to your computer and use it in GitHub Desktop.
css 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
/* add .clearfix to any element that is “collapsed” due to floated child elements */ | |
.clearfix:before, | |
.clearfix:after { | |
content: " "; | |
display: table; | |
} | |
.clearfix:after { | |
clear: both; | |
} | |
/* For IE 6/7 only */ | |
.clearfix { | |
*zoom: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment