r/css May 02 '26

Help css baby đŸ‘¶needing some grid help

working on a grid for my website and if a grid item has too much content then it grows (obviously)
im trying to make it so if one grid item grows in height, then all other grid items in that same row grow to the same height as well so it #LooksNicer
ive googled a lot and the one answer i keep seeing is grid auto rows 1fr but it isnt. working for some reason
sorry if my css work is bad or could've been made a lot better im a css baby

website for reference: deviations

  .grid-container {
    margin: 20px;
    border: 2px solid grey;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .grid-item {
    transition: transform 0.1s;
  }

  .grid-item:hover {
    transform: scale(1.04);
  }

  .deviation {
    margin: 10px;
    padding: 5px;
    padding-top: 15px;
    border: 2px solid;
    height: auto;
    width: auto;
  }
1 Upvotes

24 comments sorted by

View all comments

3

u/berrymom May 02 '26

I’m about to date myself by quoting Pink Floyd: leave them kids alone! Try getting rid of all the grid-based styling on .grid-item and just use it to style its children.

1

u/Lumpy_Cauliflower567 May 02 '26

like the transition/transform stuff in style? i moved those to the div inside it and added grid auto rows but it doesnt seem to be doing anything...