jquery - Masonry multiple image width -
i implemented masonry script cannot fit layout base on mockup. layout has different width images. tried many ways , still trying. tried custom width different size image, example
.hotspot { width:47.38%} .secpos { width:27.69%} .thepos { width:24.7%}
do guys have idea how can fix problem?
my exmple http://codepen.io/anon/pen/ngybgb
there width width: 33.333%;
$(document).ready( function() { // init masonry var $grid = $('.grid').masonry({ itemselector: '.grid-item', columnwidth: '.grid-sizer' }); // layout isotope after each image loads $grid.imagesloaded().progress( function() { $grid.masonry(); }); });
check mockup https://dribbble.com/shots/2307670-magazine-website-layout/attachments/437382
the setup fine, need define different grid sizes, in design, see @ least 3 different widths: 33.3333%, 30%, , 40% (the big one). detail .grid-sizer
width should min width going use.
hacking pen little bit, idea:
http://codepen.io/tomsarduy/pen/kdqwxz
note: also, play heights , try background-image
on .grid-item
Comments
Post a Comment