Created
June 24, 2011 22:51
-
-
Save jlong/1045839 to your computer and use it in GitHub Desktop.
3-column grid trick with nth-child clearing for variable height elements
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
section.three-column-grid { | |
clear: both; | |
width: 960px; | |
@include clearfix; | |
> section { | |
float: left; | |
padding: 0 10px; | |
width: 300px; | |
} | |
// Must have at least IE 9 | |
> section:nth-child(3n+4) { | |
clear: both; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sigh... it is a "rule of thumb"...
But thanks for the criticism. Definitely helps me think better about my HTML.