Presets:
Columns
Rows
column-gap (px)
row-gap (px)
Generated CSS
What This Tool Does
Define CSS Grid column and row tracks using any valid CSS unit (fr, px, %, auto, minmax). Add or remove tracks, set gaps, and see a live preview of the layout. Five presets cover the most common grid patterns.
Frequently Asked Questions
What is the fr unit in CSS Grid?
fr (fraction) represents a fraction of the available space in the grid container. For example, "1fr 2fr 1fr" creates three columns where the middle takes twice as much space as the others. fr values are calculated after fixed sizes (px, %) are applied.
What does repeat() do?
repeat() is a CSS Grid shorthand for repeating a track definition. "repeat(3, 1fr)" is identical to "1fr 1fr 1fr". The tool generates the explicit track definitions rather than repeat() for clarity.
What is the difference between grid-template-columns and grid-auto-columns?
grid-template-columns defines explicit column tracks. grid-auto-columns defines the size of implicitly created columns when items overflow the explicit grid. This tool generates the explicit template properties.