Objective is a fixed w/h div container, filled with elements of random width and height in a such way that they’ll leave the least visual gaps between them.
Sides and top/bottom don’t need to be even.
There are examples of “css masonry” but they mostly deal with fixed size columns and rows.
If it’s not best to use js, wasm i an option.
Any solutions for this?
1