A Formula For Determining Grid Width
With projects like 960.gs becoming prevalent, and grid design becoming more and more prominent in the eyes of high end designers, I spent a little time to work out a formula to generate a single columns width based upon three things.
- The Total Width of the Page
- The Number of Columns
- The Padding Between Columns
The formula is actually fairly simple, as you can see. It simply takes the page width, and subtracts the number of columns you desire and multiplies it by the amount of padding you specify. Then divide that by the number of columns again. Boom. You have your column width.
Not to leave something this interesting without fully tapping out my mental resources on it, I decided to write an application that would take your page width and padding, and then generate a list of possible grid solutions. You can then simply click on a grid solution, and tada! You’ve got some CSS that will help you start forming flexible grids of any width! Check out the grid generator at http://www.zacharyspencer.com/tools/grid_generator/
—Zach
