CSS Grid Generator
Visually design CSS Grid layouts with an interactive editor. Set columns, rows, gaps, and alignment with live preview!
3
3
1
2
3
4
5
6
7
8
9
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto auto auto;
gap: 16px 16px;
justify-items: stretch;
align-items: stretch;
}Features
- Visual grid builder
- Custom column/row sizes
- Gap controls
- Alignment options
- Layout presets
How to Use
- 1Set number of columns and rows
- 2Customize sizes
- 3Adjust gaps and alignment
- 4Copy generated CSS
Frequently Asked Questions
What does fr unit mean?
fr stands for "fraction". 1fr means 1 part of available space. 2fr takes twice as much as 1fr.
When should I use CSS Grid?
Grid is ideal for 2D layouts (rows AND columns). Use Flexbox for 1D layouts.