I currently have this picture shown:
It is made by:
.gallery-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
}
I've looked and it seems to not be possible to have each element only take up the space it needs instead of the height of the highest image? I've tried setting grid-auto-rows
to auto
and that does not change anything.
Any alternative solution to grid
is fine also. I've tried flexbox
and setting the flex-basis
but can't seem to get that working either.