I've been experimenting with grids in css and come across the following.
I have created a container containing several div
s
My .container
creates a grid of 5 items having a width of 20%.
I added the grid-column-gap
and noticed that it created a overflow in the container. I found that the grid-column-gap
adds it's value to the grid-template-columns
value. So I changed the value it 19%.
Now the items fit the grid. However my understanding is that grid-column-gap
is added between the div
s. What I'm having right now is that the last item also contains a gap at the right side.
I want to have the gaps between the div
s and not at the end.
Please, see the Fiddle
Can anyone explain what I'm doing wrong?