Skip to content

Instantly share code, notes, and snippets.

@leocaseiro
Created October 20, 2016 00:10
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 leocaseiro/913553efacd207e54083be3490f1b18a to your computer and use it in GitHub Desktop.
Save leocaseiro/913553efacd207e54083be3490f1b18a to your computer and use it in GitHub Desktop.
CSS Float Grid (one size only)
.row,
.row > * {
box-sizing: border-box;
}
.row::after {
content: "";
clear: both;
display: block;
}
.row .col-1 {width: 8.33%;}
.row .col-2 {width: 16.66%;}
.row .col-3 {width: 25%;}
.row .col-4 {width: 33.33%;}
.row .col-5 {width: 41.66%;}
.row .col-6 {width: 50%;}
.row .col-7 {width: 58.33%;}
.row .col-8 {width: 66.66%;}
.row .col-9 {width: 75%;}
.row .col-10 {width: 83.33%;}
.row .col-11 {width: 91.66%;}
.row .col-12 {width: 100%;}
.row [class*="col-"] {
float: left;
padding: 0;
}
img.responsive {
width: 100%;
height: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment