Kevin Powell - CommunityKP-C
Kevin Powell - Community•2y ago•
2 replies
linoleum

grid container with flexible rows?

i'm not sure if this is the right title but here we go. so i wanted to have a grid container with 3 columns. these columns have the same width. my items in it has the height of a max-content, when rendered i wanted the items to be right under each other without the grid's row height but i cant find my way around it. is there a way to set the rows in a dynamic way? or am i in the wrong path? maybe 3 columns and those columns should have flexboxes in it ? i am very lost atp. i dont have much experience with grids and english is not my first language so sorry if i dont make sense
here's my codes:
  grid-container{
    width: max-content;
    display: grid;
    grid-template-columns: repeat(3, 250px);
    gap: 1rem;
    padding: 1rem;
}
.entry{
  height: max-content;
}
grid.png
Was this page helpful?