I'm having trouble integrating masonry with Foundation mesh layout. Essentially, with the same width images with different heights, the masonry works as expected, but at certain breakpoints, the grid will only have the location of two columns, unlike the usual four.
However, if you continue to minimize the width of the browser, the four columns are returned, so there can be no place to display them.
var $container = $('#work_grid'); $container.imagesLoaded( function(){ $('#work_grid').masonry({ itemSelector: '.work_item', isAnimated: true, });
HTML
<div class="row"> <div class="twelve columns"> <div id="work_grid" class="block-grid four-up"> <li class="work_item"><img src="stylesheets/images/work1.jpg" alt=""></li> <li class="work_item"><img src="stylesheets/images/work2.jpg" alt=""></li> <li class="work_item"><img src="stylesheets/images/work3.jpg" alt=""></li> <li class="work_item"><img src="stylesheets/images/work4.jpg" alt=""></li> <li class="work_item"><img src="stylesheets/images/work5.jpg" alt=""></li> <li class="work_item"><img src="stylesheets/images/work6.jpg" alt=""></li> <li class="work_item"><img src="stylesheets/images/work7.jpg" alt=""></li> </div> </div> </div>



zurb-foundation jquery-masonry
onjegolders
source share