I've been working with masonry.js but I'm still not achieving the effect I want.
Javascript:`
var container = document.querySelector('#container');
var msnry = new Masonry( container, {columnWidth: 200, itemSelector: '.item'});
`
CSS: `
html, body, div, img {padding:0; margin:0; border:0;}
.container {width:100%;}
.item {width:19.5%;display:inline-block; margin-right:-3px;}
.item img{width:100%; vertical-align:top;}
`
HTML: `
<div class="container">
<div class="item">
<img src="http://placehold.it/350x150">
</div>
... (more HTML code)
</div>
` The current output looks like this:
However, I am aiming for a layout similar to the image below.