How to center a div inside of a masonry layout?

css, html, jquery, jquery-masonry

Solution

When you call masonry you can use the `isFitWidth: true` and also then set margin: 0 auto on the container.

$container.masonry({
    columnWidth : 120,
    isFitWidth: true

});

See example live here : Centered Masonry

Problem

I've searched EVERYWHERE and can't find an answer for this. How can I vertically and horizontally center a div in a masonry layout? I basically want everything to build around this div. Any help would be great! http://isotope.metafizzy.co/

Original source

Related problems