"Pure HTML CSS Masonry Grid Layout"
Bootstrap 3.3.0 Snippet by AminulDev

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="text-center well"> <h2>Pure HTML CSS Masonry Grid Layout</h2> </div> </div> <div class="masonry-grid"> <p>By using CSS3 columns, we can easily create a Masonry.js-like layout where random-height blocks fit together.</p> <article> <section> <p>Lorem ipsum dolor sit amet, consectetur.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error aliquid reprehenderit expedita odio beatae est.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis quaerat suscipit ad.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem nihil alias amet dolores fuga totam sequi a cupiditate ipsa voluptas id facilis nobis.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem ut debitis dolorum earum expedita eveniet voluptatem quibusdam facere eos numquam commodi ad iusto laboriosam rerum aliquam.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat architecto quis tenetur fugiat veniam iste molestiae fuga labore!</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit accusamus tempore at porro officia rerum est impedit ea ipsa tenetur. Labore libero hic error sunt laborum expedita.</p> </section> <section> <p>Lorem ipsum dolor sit.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis quaerat suscipit ad.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima asperiores eveniet vero velit eligendi aliquid in.</p> </section> <section> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus dolorem maxime minima animi cum.</p> </section> </article> </div> </div> </div>
*, *:before, *:after { box-sizing: border-box !important; } article { -moz-column-width: 13em; -webkit-column-width: 13em; -moz-column-gap: 1em; -webkit-column-gap: 1em; } section { display: inline-block; margin: 0.25rem; padding: 1rem; width: 100%; background: #efefef; } p { margin: 1rem 0; } /* styles for background color, etc; not necessary for this thing to work */ body { padding: 1em; font-family: "Garamond", serif; } h1 { font-size: 3rem; font-weight: 800; } body { line-height: 1.25; } p { text-align: left; }

Related: See More


Questions / Comments: