How to sort cards vertically

I red proposed solution when wrote this topic, searched google and I cannot find any way to place cards vertically.
I mean I have layout as this:

and I would like to place them like that:
How without making all cards wide as screen width?

You could try placing this code in a ui_template (found in the dashboard group) in your flow.
You'll have to experiment with the pixel value.

.masonry-container {
    width: 800px;

If you always want it to look like the second example, whatever sized screen you use, then put everything in one group. Then you have full control of the layout.

Thanks, started to look promising:
Thanks for hint, you are right, in that case worse look (no borders), but no different look on different devices.