Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OOCSS grids without classitis for IE9 and above
.line,
.line > :nth-child(n+2):last-child{
overflow: hidden;
}
.line > *{
float:left;
}
.line > :nth-child(1):nth-last-child(2){
width:50%;
}
.line > :nth-child(1):nth-last-child(3),
.line > :nth-child(2):nth-last-child(2){
width:33.33333%;
}
.line > :nth-child(1):nth-last-child(4),
.line > :nth-child(2):nth-last-child(3),
.line > :nth-child(3):nth-last-child(2){
width:25%;
}
.line > :nth-child(1):nth-last-child(5),
.line > :nth-child(2):nth-last-child(4),
.line > :nth-child(3):nth-last-child(3),
.line > :nth-child(4):nth-last-child(2){
width:20%;
}
.line > :last-child{
float:none;
width:auto;
}
.line > :only-child{
float:none;
overflow:visible;
}
@barneycarroll

This comment has been minimized.

Copy link
Owner Author

commented Sep 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.