HogarHerramientasGenerador de cuadrícula CSS

Generador de cuadrícula CSS

Generador de diseño de cuadrícula visual CSS

Opciones
3
3
16px
16px
1
2
3
4
5
6
7
8
9
Generated CSS
.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-column-gap: 16px;
  grid-row-gap: 16px;
}

Use these tools directly in Chrome

Install the DailyDevTools extension — access all tools from your browser toolbar

Add to Chrome

What is CSS Grid Generator?

CSS Grid is a powerful two-dimensional layout system that makes complex web layouts far easier than float or flexbox approaches. DailyDevTools' CSS Grid Generator provides a visual drag-and-drop interface to define columns, rows, gaps, and named areas — then instantly generates the complete CSS grid-template and child placement code ready to paste into your stylesheet.

How to use CSS Grid Generator

  1. 1Set the number of columns and rows for your grid layout
  2. 2Click and drag across cells to create named grid areas (header, sidebar, main, footer)
  3. 3Adjust column widths using fr units, px, %, or auto in the column template editor
  4. 4Copy the generated CSS — both the container (grid-template) and child (grid-area) rules

Frequently asked questions

What is the difference between fr units and percentages in CSS Grid?
fr (fraction unit) distributes available space after fixed-size columns are accounted for. Percentages are calculated from the parent width including gaps. Use fr for flexible, proportional columns and px for fixed-size sidebars.
When should I use CSS Grid vs Flexbox?
Use CSS Grid for two-dimensional layouts (rows and columns together). Use Flexbox for one-dimensional layouts (a row of buttons, a column of list items). They can be combined — Grid for the page layout, Flexbox within each grid area.
What is a grid-template-area?
Named grid areas let you place elements by name instead of line numbers. Define areas in the container with grid-template-areas: 'header header' 'sidebar main', then place elements with grid-area: header in child CSS.

Comments