Loading...
.card {
display: grid;
grid-template-rows: auto 1fr auto;
}.card {
display: grid;
grid-row: span 3;
grid-template-rows: subgrid;
}With subgrid, each card uses the parent's rows, so titles and buttons line up across cards.
grid-row: span N, so the subgrid has only one row.display: grid with grid-template-rows: subgrid and spans the rows it needs, like grid-row: span 3.Yes by default, but the subgrid can set its own gap to override it.
Yes. Set both grid-template-columns: subgrid and grid-template-rows: subgrid on the nested grid.
No. The parent must be a grid container, and the child must be a grid item set to display: grid.