Example

A simple grid-template-rows property example:

Laboratory

description & Usage

To determine the number and height of rows in a grid layout, we use the grid-template-rows property.

Informations

# Description
Default Value none
Inherited no
Animatable yes
Version CSS Grid Layout Module Level 1
JavaScript syntax object.style.gridTemplateRows="50px 200px"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
grid-template-rows

Syntax

Values

Values Description
none No size is specified.
auto The size of the rows is determined in such a way that the layout is done based on the content inside them.
max-content The size of the rows is determined in such a way that they are based on the largest row in the layout.
min-content The size of the rows is determined in such a way that they are based on the smallest row of the layout.
length Sets the size of the lines to be efficient than the legal length value on that page.