Two-dimensional layout control
CSS Grid manages columns and rows together. Generated code is a starting point, and production layouts may still need responsive breakpoints, minmax values, or named areas.
Build a two-dimensional CSS Grid visually. Configure columns, rows, track sizes, gaps, and alignment, test common presets, and copy the resulting styles into your project.
CSS Grid manages columns and rows together. Generated code is a starting point, and production layouts may still need responsive breakpoints, minmax values, or named areas.
Use Grid when column and row relationships both matter. Flexbox is often simpler for a single row or column.
Yes. Configure the available column and row track values in the generator.
No. Copy the base grid styles and add project-specific responsive rules as needed.
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
column-gap: 10px;
row-gap: 10px;
}1fr - Fraction of available spaceauto - Content-based size100px - Fixed size50% - Percentage of containermin-content - Minimum content sizemax-content - Maximum content sizeminmax(100px, 1fr) - Min/max rangejustify-items - Horizontal item alignmentalign-items - Vertical item alignmentstretch - Fill the grid areastart - Align to startend - Align to endcenter - Center alignmentjustify-content - Horizontal grid alignmentalign-content - Vertical grid alignmentspace-between - Space between tracksspace-around - Space around tracksspace-evenly - Equal space everywhererepeat(3, 1fr) - Repeat functionauto-fit - Responsive columnsauto-fill - Fill with empty columnssubgrid - Inherit parent gridgap: 20px - Both row and columncolumn-gap: 20px - Column spacingrow-gap: 20px - Row spacinggap: 10px 20px - Row then column