CSS grid template rows Property
CSS grid-template-rows Property
The grid-template-rows property is used to define the number and the width of rows in a grid layout. Its values are a space-separated list, where each value specifies the size of the respective column.
Default Value:-
Its default value is none.
Syntax:-
Its syntax is:- grid-template-rows: none | auto | max-content | min-content | length | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
none | Rows are created if needed. |
auto | The size of the rows is determined by the size of the container and the size of the content of the items in the row. |
max-content | Sets the size of each row to depend on the largest item in the row |
min-content | Sets the size of each row to depend on the smallest item in the row |
length | Sets the size of the rows using a length value. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |