Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pretty un-floated columns.
// columns
[class*="col-"] {
display: inline-block;
margin: 0 4% 0 -4px;
.box-sizing;
vertical-align: top;
&[class*="-left"] {
width: 68%;
text-align: center;
}
&[class*="-right"] {
width: 23%;
text-align: left;
}
// spacing
&:first-of-type { margin-left: 0; }
&:last-of-type { margin-right: 0; }
}
/*
|-----------------------------
| Usage
|-----------------------------
|
| <div class="col-left">
| ...
| </div>
|
| <div class="col-right">
| ...
| </div>
|
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment