Fixed grid

This is a layout system where the page or interface is organized using a grid with predefined column widths that do not adapt to screen size.
  • Rows and columns with fixed sizes (em, px, rem ...).
  • Ideal for highly controlled layouts where content and size are predictable.

Example

In this example we have 2 rows and a maximum of 3 columns. When a fourth element is added, it automatically goes to the next row. With grid-template-rows we define the number of rows and their height, while with grid-template-columns we define the number of columns and their width.

Additionally, with row-gap we control the spacing between rows, and with column-gap the spacing between columns.

ResultLive
html
css