0

I would like to know if anyone can help me here..

What I'm trying to do is create a grid with 3 columns.

The problem that I'm facing is that after I set.

.container => display: grid and grid-template-columns: repeat(3, 1fr) I get 3 columns, but the rows are always the height of the tallest row.

So let's say that I have 6 divs that are loading their content.

The 2 div has height 50px and the other two in the first row 30px; The 4 div will show up on the 2 row after the 50px .

Now, is there a way to make the height of the cells be independent? Maybe not with Grid? Maybe with Flexbox?

The only thing is.. I don't want to set a fixed height for anything, they will get auto based on their content.

Thanks!

Michael Benjamin
  • 307,417
  • 93
  • 525
  • 644
Renan Cidale
  • 752
  • 2
  • 9
  • 22

0 Answers0