I have found many answers showing how to set a CSS Grid (using display: grid
) rows to match the tallest item in the grid, but what I'm looking to do is size the items inside the grid to match the grid.
For example, here's a sample row in the grid. See how the first item is flush to the grid, while the other 2 items are shorter and have white space below them (since their title are shorter)? How can I get all the items to fit the grid itself?
The code for the grid:
.video-grid {
display: grid;
grid-gap: 20px;
grid-template-columns: repeat(3, 1fr);
}