Grid system showing gaps

I've been trying to figure out how to make a responsive grid, with some elements spanning 2 tiles, but I've been running into the issue that there are gaps showing up next to the spanning elements. Is there a good way to fix this? Any tips would be greatly appreciated! Here's the Codepen: https://codepen.io/aldouss/pen/yLZZZPa
No description
6 Replies
Islandstone
Islandstone13mo ago
That is happening because you have gap: 1rem on the grid.
clevermissfox
clevermissfox13mo ago
You can try using "dense" to fill in the gaps so if there are elements that will fit, they will fill in the empty cells
Anurag Gupta
Anurag Gupta13mo ago
Remove grid-gap and you will get the desired result
clevermissfox
clevermissfox13mo ago
I dont think they are talking about the grid-gap but filling in empty cells when items are spanning two cells. But we shall find out!
MarkBoots
MarkBoots13mo ago
yep, grid-auto-flow: dense; will do the trick
Jomu
JomuOP13mo ago
Perfect! grid-auto-flow: dense worked, thank you everyone for the support!
Want results from more Discord servers?
Add your server