CSS grid-auto-rows attribute


example

Set the default size of rows in the grid ::

.grid-container { display: grid ; grid-auto-rows: 150 px ; }

Give it a try »

Browser support

The number in the table indicates the first browser version number that supports this attribute .

attribute
grid-auto-rows 57 16 52 10 44

Attribute definition and instructions

grid-auto-rows Property is used to set the default size of rows in the grid container .

This property only affects rows that are not sized .

Default value : auto
inherit : no
Animation : support . Read about animatable Give it a try
Version: CSS Grid layout module Level 1
JavaScript Grammar : object.style.gridAutoColumns="120px" Give it a try


Grammar

grid-auto-rows: auto|max-content|min-content|length;

Worth Describe
auto Default value . The size of the column is determined by the size of the container
max-content Set the size of each column according to the largest grid element in the column
min-content Set the size of each column according to the smallest grid element in the column
length Use a custom length value to set the size of the column . Read about length units

Related articles

CSS course : CSS Grid layout

CSS Reference manual : grid-auto-columns attribute