Skip to content

Instantly share code, notes, and snippets.

@yetti
Last active December 26, 2015 08:59
Show Gist options
  • Save yetti/7126285 to your computer and use it in GitHub Desktop.
Save yetti/7126285 to your computer and use it in GitHub Desktop.
<div class="section group">
<div class="col span_1_of_6">
1 of 6
</div>
<div class="col span_1_of_6">
1 of 6
</div>
<div class="col span_1_of_6">
1 of 6
</div>
<div class="col span_1_of_6">
1 of 6
</div>
<div class="col span_1_of_6">
1 of 6
</div>
<div class="col span_1_of_6">
1 of 6
</div>
</div>
<hr>
<div class="section group">
<div class="col span_3_of_6">3 of 6</div>
<div class="col span_3_of_6">3 of 6</div>
</div>
<div class="section group">
<div class="col span_1_of_6">
<p>1 of 6</p>
<p>This is</p>
<p>a tall and</p>
<p>skinny col.</p>
</div>
<div class="col span_5_of_6">
<div class="section group">
<div class="col span_3_of_5">3 of 5</div>
<div class="col span_1_of_5">1 of 5</div>
<div class="col span_1_of_5">1 of 5</div>
</div>
</div>
</div>
<div class="section group">
<div class="col span_3_of_6">3 of 6</div>
<div class="col span_1_of_6">1 of 6</div>
<div class="col span_1_of_6">1 of 6</div>
</div>
.col {
background: rgba(204, 204, 204, 0.85);
}
/* SECTIONS */
.section {
clear: both;
padding: 0px;
margin: 0px;
}
.section .section .col {
margin-top: 0;
margin-bottom: 0;
}
/* COLUMN SETUP */
.col {
display: block;
float:left;
margin: 1% 0 1% 1%;
}
.col:first-child { margin-left: 0; }
/* GROUPING */
.group:before,
.group:after {
content:"";
display:table;
}
.group:after {
clear:both;
}
/* GRID OF FIVE */
.span_5_of_5 {
width: 100%;
}
.span_4_of_5 {
width: 79.8%;
}
.span_3_of_5 {
width: 59.6%;
}
.span_2_of_5 {
width: 39.4%;
}
.span_1_of_5 {
width: 19.2%;
}
/* GRID OF SIX */
.span_6_of_6 {
width: 100%;
}
.span_5_of_6 {
width: 83.16%;
}
.span_4_of_6 {
width: 66.33%;
}
.span_3_of_6 {
width: 49.5%;
}
.span_2_of_6 {
width: 32.66%;
}
.span_1_of_6 {
width: 15.83%;
}
/* GO FULL WIDTH AT LESS THAN 480 PIXELS */
@media only screen and (max-width: 480px) {
.col {
margin: 1% 0 1% 0%;
}
}
@media only screen and (max-width: 480px) {
.span_5_of_5 {
width: 100%;
}
.span_4_of_5 {
width: 100%;
}
.span_3_of_5 {
width: 100%;
}
.span_2_of_5 {
width: 100%;
}
.span_1_of_5 {
width: 100%;
}
.span_6_of_6 {
width: 100%;
}
.span_5_of_6 {
width: 100%;
}
.span_4_of_6 {
width: 100%;
}
.span_3_of_6 {
width: 100%;
}
.span_2_of_6 {
width: 100%;
}
.span_1_of_6 {
width: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment