Skip to content

Instantly share code, notes, and snippets.

@juice49
Created July 27, 2012 08:57
Show Gist options
  • Save juice49/3186917 to your computer and use it in GitHub Desktop.
Save juice49/3186917 to your computer and use it in GitHub Desktop.
Grid
/* ==========================================================================
Grid
========================================================================== */
.grid {
}
.grid > .col:first-child {
margin-left:1%;
}
.grid.double-gutter > .col:first-child {
margin-left:2%;
}
/*
* Disable the outside spacing on nested grids
*/
.grid .grid > .col:first-child {
margin-left:0;
}
.grid > .col {
float:left;
vertical-align:top;
margin-right:1%;
}
.grid.fixed > .col {
margin-right:12px;
}
.grid.double-gutter > .col {
margin-right:2%;
}
.grid > .col:last-child {
margin:0;
}
.grid.three {
}
.grid.three > .col {
width:33%;
}
.grid.three.double-gutter > .col {
width:32%;
}
.grid.three > .col.span-two {
width:66%;
}
.grid.three.double-gutter > .col.span-two {
width:65%;
}
.grid.four {
}
.grid.four > .col {
width:23%;
}
.grid.four.double-gutter > .col {
width:22%;
}
.grid.four > .col.span-two {
width:50%;
}
.grid.four.double-gutter > .col.span-two {
width:47%;
}
.grid.five {
}
.grid.five > .col {
width:18.8%;
}
.fixed.grid.five > .col {
width:214px;
}
.grid.five > .col.span-three {
width:58.4%;
}
.grid.seven {
}
.grid.seven > .col {
width:13.12%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment