desandro/masonry — Issue #177: Masonary run late in page render
Author: drewbaker
Created: 2012-02-22 07:27:07+00:00
State: open

Hello,
I've played around with this a lot, and have used Masonry on a lot of projects. I can only conclude that this is a bug.

I have the containing element CSS of:

```
#content.video-grid {
margin: 0 auto;
overflow: hidden;
}
```
With each brick given this CSS:

```
.grid-block {
float: left;
height: 220px;
width: 240px;
overflow: hidden;
padding: 0 0 20px 0;
}
```

And Masonry called like this:

```
jQuery('#content.video-grid').masonry({
itemSelector : '.grid-block',
columnWidth : 240,
isAnimated: true,
isFitWidth: true,
gutterWidth: 2
});
```

This should result in no "shuffling" of the bricks after the page is loaded, but for some reason it waits until everything is loaded, then it applies the width the the containing element as dictated by isFitWidth.

Here it is not working:
http://dev.massmarket.tv/work/all/

Here is the same implementation working:
http://www.caviarcontent.com/los-angeles/

So there must be something is causing Masonry to run late, but I have been unable to figure it out.

-Drew