A simple, easy-to-use 12-column responsive grid with some nice features. Built with Simple Grid Generator.
Set the default grid width, then override at different screen widths with breakpoint prefixes. Offset classes work this way also
<div class="grid-3 offset-4 m-grid-6 s-grid-12">
<!--
Translates to:
- Quarter width by default
- Half width at the medium breakpoint
- Full width at the small breakpoint
-->
<div class="grid-4 offset-6 s-grid-12 s-offset-0">
<!--
Translates to:
- Third width, offset to right half of the page
- Full width at the small breakpoint, no offset
-->
For quick, easy layouts, use the grid to set consistent padding and margin on all your elements (top, bottom, left, right, horizontal, vertical, all).
By default, there are 3 levels of padding/margin you can apply (or none).
/* For example... */
.pad-0 { padding: 0; }
.pad-1 { padding: 0.25em; }
.pad-1-sides { padding-left: 0.5em; padding-right: 0.5em; }
.pad-3-bottom { padding-bottom: 2em; }
.marg-3-vert { margin-top: 1em; margin-bottom: 1em; }
Breakpoint prefixes can also be used to easily make layout adjustments for different screen widths.
<div class="pad-1 m-pad-1 s-pad-0">
Do any of the following:
grid.min.css
into your stylesheet/sass
directory in your project. Read below fo customization options.Resize your browser window to view breakpoint layout changes.
grid-3 m-grid-6 s-grid-12
grid-3 m-grid-6 s-grid-12
grid-3 m-grid-6 s-grid-12
grid-3 m-grid-6 s-grid-12
grid-3 s-grid-12
grid-8 m-grid-9 s-grid-12 l-offset-1
If you are familiar with Sass, you can use the Simple Grid Generator mixin to set your own values for:
Switch to a 18-column or 24-column grid instead.
Change breakpoints, or add more.
(e.g. xs-, xl-, etc.)
Add more, take some away. Set the values however you like, px or em. Use only padding (no margin) or just remove them altogether.
For more information, go to the Simple Grid Generator Project Page.
Author & copyright (c) 2015: John Polacek, Dual MIT & GPL license