I have an isotope grid with a non fixed width and I dont know how to center the items inside the isotope container.
.box{
width: 40px;
height: 40px;
background-color: #e74c3c;
margin: 0 auto;
}
that css fails to center the items. here is the link to the fiddle that illustrates my problem.
How can i make the red squares center inside the black box?
use masonry and add margin 0 auto to the grid.
js:
masonry: {
columnWidth: 100,
fitWidth: true
}
css :
.grid {
margin: 0 auto;
}