CSS Grid Track Calculator
Build grid-template-columns and grid-template-rows values visually by mixing fr, px, %, em, rem, and minmax() tracks.
Column Tracks 0
No column tracks yet — click "Add Column"
Row Tracks 0
No row tracks yet — click "Add Row"
Gap / Gutter
Generated CSS
.grid-container {
/* Add tracks above to generate CSS */
}
Visual Preview (proportional)
Add column and row tracks to see the grid preview.
Track Summary
Add tracks to see a summary.
Summary
Build grid-template-columns and grid-template-rows values visually by mixing fr, px, %, em, rem, and minmax() tracks.
How it works
- Add column tracks using the "+ Add Column" button and choose a unit type: fr, px, %, em, rem, auto, or minmax().
- Set the value for each track. For minmax(), enter a minimum and maximum separately.
- Repeat the same steps for row tracks if you need grid-template-rows as well.
- Set the gap between tracks (column-gap and row-gap) to complete the shorthand.
- Copy the generated CSS from the output panel and paste it directly into your stylesheet.
Use cases
- Design a Holy Grail layout with a fixed sidebar, fluid content area, and another fixed sidebar using fr and px tracks.
- Create a responsive image gallery grid where each column is at least 200px but expands to fill space with minmax(200px, 1fr).
- Build a dashboard with named areas by first mapping out the track sizes here.
- Generate equal-column grids (e.g. repeat(3, 1fr)) and verify how the fr values are distributed.
- Prototype asymmetric layouts without writing CSS by hand.
- Teach CSS grid concepts visually by tweaking track values and watching the preview update live.
Frequently Asked Questions
Last updated: 2026-07-01 ·
Reviewed by Nham Vu