Explicit grid
This is a layout system where the grid is explicitly defined using grid-template-rows and grid-template-columns.
- Rows and columns are declared directly in the grid.
- No additional rows or columns are created unless items force them (in which case the implicit grid comes into play).
- Ideal for predictable layouts, where the exact number of rows and columns is known in advance.
Example
In this dynamic example, since we do not handle the sizes of rows and columns that are created implicitly, these will take the height and width of the child.
ResultLive
html
css