Created
August 24, 2012 03:09
-
-
Save phrz/3445053 to your computer and use it in GitHub Desktop.
960 Grid System (12 column) - in very compact CSS
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
/* BEGIN GRID STYLING */ | |
.prototype { | |
outline: 1px solid red; | |
} | |
.row { | |
width: 940px; | |
padding: 0 10px; | |
margin: 0 auto; | |
} | |
.span1, .span2, .span3, .span4, .span5, .span6, .span7, .span8, .span9, .span10, .span11, .span12 { | |
width: 940px; | |
margin: 0 8px; | |
display: inline-block; | |
} | |
.span1 { | |
width: 60px; | |
} | |
.span2 { | |
width: 140px; | |
} | |
.span3 { | |
width: 220px; | |
} | |
.span4 { | |
width: 300px; | |
} | |
.span5 { | |
width: 380px; | |
} | |
.span6 { | |
width: 460px; | |
} | |
.span7 { | |
width: 540px; | |
} | |
.span8 { | |
width: 620px; | |
} | |
.span9 { | |
width: 700px; | |
} | |
.span10 { | |
width: 780px; | |
} | |
.span11 { | |
width: 860px; | |
} | |
.span12 { | |
width: 940px; | |
} | |
.first { | |
margin-left: 0; | |
} | |
.last { | |
margin-right: 0; | |
} | |
.pre1, .pre2, .pre3, .pre4, .pre5, .pre6, .pre7, .pre8, .pre9, .pre10, .pre11 { | |
margin-left: 870px; | |
} | |
.pre1 { | |
margin-left: 70px; | |
} | |
.pre2 { | |
margin-left: 150px; | |
} | |
.pre3 { | |
margin-left: 230px; | |
} | |
.pre4 { | |
margin-left: 310px; | |
} | |
.pre5 { | |
margin-left: 390px; | |
} | |
.pre6 { | |
margin-left: 470px; | |
} | |
.pre7 { | |
margin-left: 550px; | |
} | |
.pre8 { | |
margin-left: 630px; | |
} | |
.pre9 { | |
margin-left: 710px; | |
} | |
.pre10 { | |
margin-left: 790px; | |
} | |
.pre11 { | |
margin-left: 870px; | |
} | |
/* END GRID STYLING */ |
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
.prototype{outline:1px solid red}.row{width:940px;padding:0 10px;margin:0 auto}.span1,.span2,.span3,.span4,.span5,.span6,.span7,.span8,.span9,.span10,.span11,.span12{width:940px;margin:0 8px;display:inline-block}.span1{width:60px}.span2{width:140px}.span3{width:220px}.span4{width:300px}.span5{width:380px}.span6{width:460px}.span7{width:540px}.span8{width:620px}.span9{width:700px}.span10{width:780px}.span11{width:860px}.span12{width:940px}.first{margin-left:0}.last{margin-right:0}.pre1,.pre2,.pre3,.pre4,.pre5,.pre6,.pre7,.pre8,.pre9,.pre10,.pre11{margin-left:870px}.pre1{margin-left:70px}.pre2{margin-left:150px}.pre3{margin-left:230px}.pre4{margin-left:310px}.pre5{margin-left:390px}.pre6{margin-left:470px}.pre7{margin-left:550px}.pre8{margin-left:630px}.pre9{margin-left:710px}.pre10{margin-left:790px}.pre11{margin-left:870px} |
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
<div class="row"> | |
<div class="span1 first">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1">1</div> | |
<div class="span1 last">1</div> | |
</div> | |
<div class="row"> | |
<div class="span2 pre10 first last">Hello</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment