CSS grid-auto-rows property
Example
Set the default size of rows in the grid::
.grid-container
{
display:
grid
;
grid-auto-rows:
150
px
;
}
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| grid-auto-rows | 57 | 16 | 52 | 10 | 44 |
Property definition and usage
The grid-auto-rows property sets the default size of rows in a grid container.
This property only affects rows whose size is not set.
| Default value: | auto |
|---|---|
| Inherited: | no |
| Animatable: | support. Read about animatable Try it |
| Version: | CSS Grid Layout Module Level 1 |
| JavaScript syntax: | object.style.gridAutoColumns="120px" Try it |
Syntax
grid-auto-rows: auto|max-content|min-content|length;
| Value | Description |
|---|---|
| * auto * | Default value. The column size is determined by the container size |
| max-content | Sets the size of each column based on the largest grid item in the column |
| min-content | Sets the size of each column based on the smallest grid item in the column |
| length | Uses a custom length value to set the column size.Read about length units |
Related Articles
CSS Tutorial: CSS Grid Layout
CSS Reference Manual: grid-auto-columns property