The grid-template-rows property in CSS is used to set the number of rows and height of the rows in a grid. The values of grid-template-rows are space-separated, where each value represents the height of the row.
grid-template-rows: none|auto|max-content|min-content|length| initial|inherit;
- none: It does not set the height of grid-template-row property. It creates row when needed.
- auto: It is used to set the size of row automatically i.e it depends on the size of container & contents in row.
- max-content: It represents the maximum content of the items present in the grid.
- min-content: It represents minimal content of the items present in the grid.
- length: The size of row is set according to the specified length.
- Google Chrome 57.0
- Internet Explorer 16.0
- Firefox 52.0
- Safari 10.0
- Opera 44.0
- CSS | transition-property Property
- CSS | top Property
- CSS | nav-down property
- CSS | right Property
- CSS | all Property
- CSS | nav-right property
- CSS | clip Property
- CSS | left Property
- CSS | transition Property
- CSS overflow-y Property
- CSS | perspective Property
- CSS | flex Property
- CSS | align-self Property
- CSS | resize Property
- CSS | Display property
Supported Browsers: The browser supported by grid-template-rows property are listed below:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.