I'm using a combination of Bootstrap and PHP to create a Portfolio section.
I have around 12 items, and I want to display 4 of them on each row.
Problem is that no matter what I do, the units are stick to the left side of the container, and I seem unable to center them, even with all the searches here on SO.
Here's the code I'm using.
HTML
<section class="wow fadeInUp animated" data-wow-offset="200" id="portfolio">
<div class="container">
<h2>Portfolio</h2>
<div class="filter">
</div>
<div class="thumb-container" >
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
<div class='thumb-unit'></div>
</div>
</div>
</section>
CSS
.container{
width: 70%;
}
#portfolio{
height: 100%;
background-color: white;
padding-bottom: 50px;
}
#portfolio .filter{
height: 50px;
text-align: center;
background: transparent;
border-top: 1px solid #7f8c8d;
border-bottom: 1px solid #7f8c8d;
width: 100%;
margin-top: 30px;
}
.thumb-container{
width: 100%;
margin: 15px auto;
text-align: center;
background: red;
}
.thumb-unit{
width: 300px;
height: 225px;
display: inline-block;
margin: 5px;
position: relative;
overflow: hidden;
cursor: pointer;
background: blue;
}
How in this earth can I center those thumb-units inside the thumb-container? Any help highly appreciated.
EDIT
The weird thing is that on JSFiddle it works, but I don't understand why it doesn't on mine. Tried to refresh cache and on another browser, but the result is the same.
EDIT 2
I found out that the problem is isotope, the library I'm using for filtering.
Has anyone encountered this problem?