Skip to content

Instantly share code, notes, and snippets.

@peterwilsoncc
Created October 4, 2012 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterwilsoncc/3830957 to your computer and use it in GitHub Desktop.
Save peterwilsoncc/3830957 to your computer and use it in GitHub Desktop.
Grid
.g-row {
max-width:1200px;
*width: 960px;
overflow: hidden;
}
.g {
float: left;
padding-left: 10px;
padding-right: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
.g-25pc {
width: 25%;
*width: 220px; /* + 10*2 = 240 */
}
.g-50pc {
width: 50%;
*width: 460px; /* + 10*2 = 480 */
}
.g-75pc {
width: 75%;
*width: 700px; /* + 10*2 = 720 */
}
.g-100pc {
width: 100%;
*width: 940px; /* + 10*2 = 960 */
}
<div class="g-row">
<div class="g g-50pc"> </div>
<div class="g g-50pc"> </div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment