Column Grid Planner: Columns, Gutters and Margins with CSS
Calculates the width and left edge of every column in a design grid and writes the matching CSS grid and an SVG overlay.
Use the tool
Why this tool exists
Design files and code need the same numbers. The tool applies column = (canvas - 2 x margin - gutter x (columns - 1)) / columns, lists each column start, shows the width of a four column span and gives CSS that reproduces the grid with fractional units.
It rejects settings where columns would have no width. The overlay preview is an SVG you can paste into a design tool.
How to use it
- Enter canvas width, number of columns, gutter and margin.
- Run the tool.
- Read the column width and positions.
- Copy the CSS grid or the SVG overlay.
Frequently asked questions
Is this the same as CSS Grid Generator?
That tool builds CSS grids interactively. This one starts from design numbers and gives exact pixel positions.
Why fractional widths?
Many grids do not divide evenly. Design tools round them, CSS keeps them exact.
Can I use percentages?
Use the 1fr columns in the CSS, which adapt to the width.
What about baseline grids?
Not included.