Skip to content

Snippets / CSS

CSS

Masonry Layout

S Steven Ellis · 352 views · Updated 1 year ago
Hello,
Just wanted to share with you lot my solution for making a Masonry Layout with a little bit of CSS.
Hope this is helpful.
Thanks
1. Using the Post feed (VX) widget, select your post type and keep all the settings as default. 2. Put a class on the Post feed (VX) widget, here I have called it work-grid. 3. Put a class on the Preview Card, here I have called it work-card. 4. Add the CSS, tweak however you like!
.work-grid .post-feed-grid {
display: block !important;
column-count: 3 !important;
column-gap: 20px !important;
column-width: 320px !important;
}
.work-grid .post-feed-grid .work-card {
break-inside: avoid;
position: relative;
margin-bottom: 20px;
}
CSS · 11 lines

Discussion 1

Ask a question or share how you used this.

Log in to join the discussion.
asoftby 1 year ago

How to make two columns in mobile version? Thnx

Voxel Guide assistant
Ask about snippets, addons & how-tos

Hey — how can I help?

I can dig through the library for snippets, addons, and tutorials.

AI can be wrong — double-check anything important.