I have a masonry container inside of a div that has display:none in inline style. Because I have a few divs, when the page loads it switches like a slideshow when their button is clicked. This interferes with masonry’s ability to gauge the height on load so consequently the bricks spill out of the container.
I have a masonry container inside of a div that has display:none in inline
Share
Update: the
.load()part of my answer is not how this should be done.See: http://masonry.desandro.com/layout.html#imagesloaded
You can fix it by:
overflow: hiddento.panelto clear the floated elements inside.Running Masonry on.load()instead of.ready():Version with those fixes: http://jsbin.com/oyido4/4