Remove the columnWidth property, and Freemasonry will use the width of the first element of the element. ( Docs ).
Check out the JSFiddle . http://jsfiddle.net/s8PhS/14/
If you resize the HTML container in JSFiddle, it will also be dynamically resized.
I also added some additional <div> elements for demo purposes and Odd Five element with different heights, and you can see how the Freemasonry plugin launches and positions elements perfectly.
So basically, remove the columnWidth: 250 property and let Freemasonry raise it dynamically.
In JSFiddle, this seems to solve your problem.
Only advice . I recently used the same jquery.masonry plugin, but also wanted to sort my elements, I found this awesome plugin called
Isotope , which is awesome and much more customizable.
Check out the demo on the home page!
source share