Within a div, there is a masonry container with the inline style property display:none
. With several divs on the page, clicking their respective buttons during load causes them to switch like a slideshow. This disrupts masonry's ability to calculate the height accurately upon loading, resulting in the bricks overflowing from the container.