Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Created December 30, 2011 19:24
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save nathansmith/1541124 to your computer and use it in GitHub Desktop.
Save nathansmith/1541124 to your computer and use it in GitHub Desktop.
Percentage Based "Grid"
// How I would approach a fluid grid:
//
// [1] Let the name reflect the % width,
// eliminating "1 of 12" guesswork.
//
// [2] Also, put 10px of padding to either
// side, to stack and make a 20px gutter.
//
// [3] Make the box-sizing = border-box, so that
// 50% + 20px total side padding = 50%, etc.
//
// [4] Have a class of "is-parent" to kill off
// the padding on units with nested children.
@nathansmith
Copy link
Author

NOTE:

I've gone ahead and built this out into an actual grid framework.

http://unsemantic.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment