UtilVox
grid_view

CSS Grid Generator — Free Visual Grid Builder

Visually design complex CSS Grid layouts and export production-ready code.

visual_preview.exe
1
2
3
4
5
6
7
8
9
codeGENERATED CSS
.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 16px 16px;
  justify-items: stretch;
  align-items: stretch;
  justify-content: start;
  align-content: start;
}

/* Individual item sizing example */
.grid-item {
  background: rgba(245, 200, 66, 0.1);
  border: 1px solid rgba(245, 200, 66, 0.3);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

Grid Cheat Sheet

display: grid;

Initializes the grid container. Everything inside becomes a grid item.

grid-template-columns

Defines the width of each column. Use fr, px, or %.

grid-template-rows

Defines the height of each row in the container.

gap

Sets the spacing between rows and columns simultaneously.

grid-column

Determines which column an item starts and ends in.

grid-area

Shorthand for row-start, col-start, row-end, and col-end.

Frequently Asked Questions

Grid: Layout in Two Dimensions

The handful of patterns that cover most layouts

Most production grids are one of these:

PatternTemplateUse
Equal columnsrepeat(3, 1fr)Card rows, feature sections
Sidebar + content240px 1frDocs, dashboards
Responsive auto-fitrepeat(auto-fit, minmax(250px, 1fr))Galleries that reflow without media queries
Holy grailNamed areas: header, sidebar, main, footerWhole-page scaffolding
12-column systemrepeat(12, 1fr) + spanDesign-system layouts

The two concepts that unlock grid

fr units distribute remaining space — 240px 1fr 1fr means: give the sidebar its 240, split the rest equally. auto-fit + minmax is the famous one-liner: columns at least 250px wide, as many as fit, stretched to fill — responsive galleries with zero media queries. Add gap for spacing (it replaced margin hacks) and you've covered 90% of real grid usage.

Grid or flexbox?

Grid places items in two dimensions (rows and columns known in advance); flexbox flows items in one direction and wraps. Page scaffolding, card matrices, dashboards → grid. Toolbars, nav rows, centering, content of unknown count → the flexbox playground. They nest happily — grid for the page, flex inside each card. Spacing and sizing stay consistent with the px to rem converter, and corner/shadow polish comes from border radius.