Skip to content

Instantly share code, notes, and snippets.

@admench
Last active August 29, 2015 14:23
Show Gist options
  • Save admench/f02e86b9cdf43acfbd58 to your computer and use it in GitHub Desktop.
Save admench/f02e86b9cdf43acfbd58 to your computer and use it in GitHub Desktop.
3 column layout, using output from Bourbon Neat.
html {
box-sizing: border-box; }
.grid-layout::after {
clear: both;
content: "";
display: table; }
.grid-item {
margin-bottom: 2em;
float: left;
display: block;
margin-right: 2.35765%;
width: 31.76157%; }
.grid-item:last-child {
margin-right: 0; }
.grid-item:nth-child(3n) {
margin-right: 0; }
.grid-item:nth-child(3n+1) {
clear: left; }
<div class="grid-layout">
<div class="grid-item">
</div>
<div class="grid-item">
</div>
<div class="grid-item">
</div>
<div class="grid-item">
</div>
<div class="grid-item">
</div>
<div class="grid-item">
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment