In the Bootstap element .row .row
used to clear the floats of the div blocks / col it contains (in your ex. col-lg-4
);
Thus, in principle, it is impossible for elements in different lines to stand next to each other, you definitely need to change the markup;
On the other hand, using a bootstrap-responsive column system can be useful for creating CSS Freemasonry effects:
you can try to place all the "col-items" that you want to make the masonry effect on the inside of one line , displaying as an inline block (plus, perhaps, some other minor adjustments ..) should do the trick (this is the way if you are only stuck with CSS ..);
In conclusion, remember that Freemasonry was born and remains a JavaScript grid layout library, so even if you can make it work with CSS, I suggest you use JS.
a thousand thanks to Desandro for this amazing idea;
source share