Created
March 7, 2012 10:08
-
-
Save maxxscho/1992354 to your computer and use it in GitHub Desktop.
CSS: Clearing (from Skeleton)
This file contains hidden or 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
/* CLEARING | |
============================================================================ */ | |
/* Self Clearing Goodness */ | |
.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; } | |
/* Use clearfix class on parent to clear nested columns, | |
or wrap each row of columns in a <div class="row"> */ | |
.clearfix:before, | |
.clearfix:after, | |
.row:before, | |
.row:after { | |
content: '\0020'; | |
display: block; | |
overflow: hidden; | |
visibility: hidden; | |
width: 0; | |
height: 0; | |
} | |
.row:after, | |
.clearfix:after { | |
clear: both; | |
} | |
.row, | |
.clearfix { | |
zoom: 1; | |
} | |
/* You can also use a <br class="clear" /> to clear columns */ | |
.clear { | |
clear: both; | |
display: block; | |
overflow: hidden; | |
visibility: hidden; | |
width: 0; | |
height: 0; | |
} | |
hr.clear { | |
margin: 0; | |
border: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment