DEV Community

Discussion on: Basic CSS Grid

Collapse
 
colocba profile image
Amir • Edited

Nice article Halimah!
Just wanted to add a pretty cool property. As you did on the example, your 2 first rows are going to be with a height of 60px. But what is going to be the height for the upcoming rows?

For that comes into the game grid-auto-rows. With this property you can set the height of the upcoming rows in general. This will allow you to control your layout with more data that could be entered.

So, if we want all rows to be 60px height we can just remove the grid-template-rows and add grid-auto-rows: 60px;

Or if we want the 2 first with 60px and the rest to be 40px for example, we can add grid-auto-rows: 40px;

Congrats on the post :)

Collapse
 
devhalimah profile image
Halimah • Edited

Wow
Nice one Amir 👍

Thanks for this!
I learnt from it too 😊