I want to center an inline-flex container inside of parent div, but setting margin:auto doesn't do anything even though the parent div is wider than the flex container. (as you can see from the result)
Setting justify-content to center doesn't give the wanted result.
I tried to set display:inline-flex in the css to see if it was a Bootstrap issue, but no go.
I've set the background-color's to visualize the object's.
Html:
<div class="d-none d-md-block" style="background-color:blue;">
<div class="d-inline-flex flex-wrap lc-product-thumb-wrap">
<img src="demo1.png" class="lc-product-thumb-img" id="thumb-0" />
<img src="demo1.png" class="lc-product-thumb-img" id="thumb-1" />
<img src="demo2.png" class="lc-product-thumb-img" id="thumb-2" />
</div>
</div>
CSS:
.lc-product-thumb-wrap {
background-color: pink;
margin: auto;
}
.lc-product-thumb-wrap .lc-product-thumb-img {
width: 98px;
margin: 2px;
padding: 4px;
border: 1px solid #003c02;
background-color: #dafac1;
}