It looks like each of your boxes is being assigned absolute
positioning like so:
<div class="box" style="position: absolute; left: 0px; top: 0px;"></div>
<div class="box" style="position: absolute; left: 80px; top: 0px;"></div>
<div class="box" style="position: absolute; left: 160px; top: 0px;"></div>
<div class="box" style="position: absolute; left: 240px; top: 0px;"></div>
The way I got it to work was to wrap all the boxes in another div
container, and manipulate the relative
positioning of that new container like this (or check out this fiddle):
var $container = $('#container');
// init
$container.isotope({
// options
itemSelector: '.box',
layoutMode: 'fitRows'
});
#container {
background-color: #333;
width: 90%;
height: auto;
margin: 0 auto;
position: relative;
}
#boxes-collection {
position: absolute;
left: 28%;
width: 100%;
}
.box {
width: 40px;
height: 40px;
background-color: #e74c3c;
margin: 20px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://squaredoodletest.t15.org/JS/isotpoe.js"></script>
<div id="container">
<div id="boxes-collection">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</div>
#container
has a non-fixed width. He specified that in the question. – Staff