Skip to content

Instantly share code, notes, and snippets.

@Grom-S
Last active September 26, 2015 23:27
Show Gist options
  • Save Grom-S/1175392 to your computer and use it in GitHub Desktop.
Save Grom-S/1175392 to your computer and use it in GitHub Desktop.
CSS: simple fluid grid system
/* @group Columns
------------------------------------------------------------ */
.one-half { width: 48%; }
.one-third { width: 30.66%; }
.two-third { width: 65.33%; }
.one-fourth { width: 22%; }
.three-fourth { width: 74%; }
.one-fifth { width: 16.8%; }
.two-fifth { width: 37.6%; }
.three-fifth { width: 58.4%; }
.four-fifth { width: 67.2%; }
.one-sixth { width: 13.33%; }
.five-sixth { width: 82.67%; }
.one-half,
.one-third,
.two-third,
.three-fourth,
.one-fourth,
.one-fifth,
.two-fifth,
.three-fifth,
.four-fifth,
.one-sixth,
.five-sixth {
float: left;
position: relative;
margin-right: 4%;
}
.last {
clear: right;
}
.last {
margin-right: 0 !important;
}
/* @end */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment