I'm struggling to achieve layout as shown on image attached.
I need to have boxes of various height lined up from left to right in order 1,2,3...n as shown below.
If there is no space to the right the box should drop below the first box on the left.
I also need to be able to remove and add boxes. If box removed other boxes below the one removed should slide up.
I tried float them, inline-block and jquery masonry with no luck.
Couldn't find the setting in masonry that would automatically adjust the layout once the box is hidden.
I would greatly appreciate any help as I run out of ideas.