How to organize a uniform filling of the parent divas diva?
There is a parent div block. Within it are a rectangular content blocks. It is unknown how many of them will, because they are added in the admin category. I wish they nicely filled out the parent Div.
Rummaged in the algorithm of masonry, but it doesn't quite fit. It is necessary to set the block size - double height or double width. And that JS himself has distributed them evenly - this will not work.
Here, for example, 4 pieces. In this case, it would be nice, if only it was two rows of two blocks.
If there are five of them, two on top, one in center, two at the bottom.
Well, or such an algorithm to the size picked up - like when you add pictures in VK. There's also all of the pictures occupy a rectangular space. But it's not masonry