A "Masonry" layout is a way to fit together elements of possibly different sizes without gaps.
This is a simple implementation in Elm.
Post: Simple masonry layout in 50 lines of Elm code
Code: github.com/lucamug/elm-masonry
Demo1 : elm-masonry.surge.sh
Demo2 : elm-masonry.surge.sh/simple.html