I have this grid CSS
.grid {
display: grid;
grid-column-gap: 50px;
grid-template-columns: repeat(3, 1fr);
}
which is sitting in a div with width: 500px
but I noticed that the first item in the grid "hugs" the left edge of the div but the far most right item doesn't touch the edge of the div.
In flexbox I could achieve this with (near enough):
.flex {
display: flex;
justify-content: space-between;
}
how do I do this responsively with the grid?
I know I can change the grid-column-gap but that seems flakey
gap
– Gametophytejustify-content: space-between;
it does work with CSS grid – Sporocarpjustify-content
– Terpineol