CSS Grid Issue

Hello,

I'm having an issue that I'm trying to work around without having to rebuild my layout. I used CSS grid to build a marketplace layout, defined by:
grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));

This works perfectly fine, as long as there's enough content to fill. However, when there's not enough content, it looks something like (picture #2). What should I try to do in order to fix this?
image.png
image.png
Was this page helpful?