I’m currently trying to make a masonry grid style gallery to showcase various architectural projects, and I’ve got this far:
I’m fairly happy with how that particular project looks, however when projects with fewer images are loaded, such as this:
You can see that it loads from left to right, rather than top to bottom.
I appreciate this may a quirk owing to the way I’ve set it up (I followed this ) so if anyone would be so kind as to help me get it right, it would be much appreciated. Ideally I would like a way of forcing the number of columns to be fewer when there are fewer items to load (unless someone else has a better idea). I am sure flexbox might be able to do this, but I’m stumped if I know how!
[EDIT] I should probably add that I’d like to be able to click these images and them show up in a lightbox.
Thank you in anticipation!