NoReceipt4Panda NoReceipt4Panda - 5 months ago 15
jQuery Question

How to make bootstrap grid system elements, masonry style?

I'm looking to use bootstrap in this way:

<div class="col-md-4">
Content..
</div>
<div class="col-md-4">
Content..
</div>
<div class="col-md-4">
Content..
</div>
<div class="col-md-4">
Content..
</div>
//And so on..


These div's are being added dynamically.

I don't know if there's an extra class I could add to the div's to make them masonry style, but for a visual example, Here's what I'm getting so far:

bootstrap grid system non masonry style

and Here's what I'm looking to achieve:

bootstrap grid system masonry style

Does anyone know any classes I can add to achieve this effect?

Answer

This link might help you : http://www.bootply.com/118335 Also try this

<div class="two-columns">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</div>
<div class="double-wide">
</div>
<div class="two-columns">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</div>

Also, https://designshack.net/articles/css/masonry/

Comments