Created
November 21, 2010 00:02
-
-
Save irae/708294 to your computer and use it in GitHub Desktop.
The better way to clearfix ever!
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
/* The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */ | |
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */ | |
/* Note: It's better to use display:inline-block; if width is set on the element you want to clear */ | |
.clearfix:before, .clearfix:after { | |
content: "\0020"; display: block; height: 0; visibility: hidden; | |
} | |
.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