Created
November 29, 2011 14:24
-
-
Save sfoster/1404965 to your computer and use it in GitHub Desktop.
yui-inspired grid css
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
/** | |
* grid essentials | |
*/ | |
.row { | |
letter-spacing: -0.31em; /* webkit: collapse white-space between units */ | |
*letter-spacing: normal; /* reset IE < 8 */ | |
word-spacing: -0.43em; /* IE < 8 && gecko: collapse white-space between units */ | |
} | |
.col { | |
display: inline-block; | |
*zoom: 1; *display: inline; /* IE < 8: fake inline-block */ | |
letter-spacing: normal; | |
word-spacing: normal; | |
vertical-align: top; | |
} | |
/* | |
* for things needing to fill their containing column | |
*/ | |
.col .fullWidth { | |
width: 100%; | |
} | |
.col-right { | |
text-align: right; | |
} | |
.col-1of1 { | |
display: block; | |
} | |
.col-1of2 { | |
width: 50%; | |
} | |
.col-1of3 { | |
width: 33.33333%; | |
} | |
.col-2of3 { | |
width: 66.66666%; | |
} | |
.col-1of4 { | |
width: 25%; | |
} | |
.col-3of4 { | |
width: 75%; | |
} | |
.col-1of5 { | |
width: 20%; | |
} | |
.col-2of5 { | |
width: 40%; | |
} | |
.col-3of5 { | |
width: 60%; | |
} | |
.col-4of5 { | |
width: 80%; | |
} | |
.col-1of8 { | |
width: 12.5%; | |
} | |
.col-3of8 { | |
width: 37.5%; | |
} | |
.col-5of8 { | |
width: 62.5%; | |
} | |
.col-7of8 { | |
width: 87.5%; | |
} | |
.col-1of6 { | |
width: 16.656%; | |
} | |
.col-5of6 { | |
width: 83.33%; | |
} | |
.col-1of10 { | |
width: 10%; | |
} | |
.col-3of10 { | |
width: 30%; | |
} | |
.col-7of10 { | |
width: 70%; | |
} | |
.col-9of10 { | |
width: 70%; | |
} | |
.col-1of12 { | |
width: 8.33%; | |
} | |
.col-5of12 { | |
width: 41.66%; | |
} | |
.col-7of12 { | |
width: 58.33%; | |
} | |
.col-11of12 { | |
width: 91.66%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment