i have a simple grid layout, inside of it are 3 children div. I would like to add a gap of 16px in between those children. However, adding a gab seems to push the children outside. Instead, I wish the children would shrink a bit so that there is space for the gap. I thought that’s what a gap was for ?
Hello Anthony!
just add a custom property to Contact_Mosaic
(grid-template-columns) and value is “repeat(3, 1fr)”, that should do how you want it to behave.
thank you very much for getting back to me, your solution almost does the trick. I had to change to repeat(2, 1fr) so that it does’t push the children on the sides, however it still pushes them downwards (the images are overlapping the red section, they shouldn’t overlap they should remain contained within the green parent)