Problem with CSS autofit

Hello Everyone
I am having a little problem with autofit in CSS grid for my mobile version page . I don’t know why when items wrap, I don’t get the same space between each of them. I tried changing column and row gap values but nothing changed .
Here you can see clearly the issue .

Here is the pen :

You probably don’t need to set grid-template-rows, since items will be placed in an implicit row anyway, and it lets the browser set the row heights automatically. With that, just set the row gaps as you see fit.

To add, I don’t think autofit is related to your problem

1 Like

Thank you very much , that was helpful !