When you want a simple masonry grid for your image gallery this is going to be your go-to snippet. Designed by Joseph Shambrook, this is a pure CSS snippet.
If you are having trouble with the pen, try the archived copy on GitHub
Masonry Grid Snippet
See the Pen CSS Grid L+L – Finished by Joseph Shambrook (@josephshambrook) on CodePen.0