I've been struggling to make a div adjust to its content size here. I've attempted various methods to shrinkwrap it, but none seem to work.
<div class="outer">
<div class="cont">
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
<img src="http://www.placehold.it/100" />
</div>
</div>
Both
display: table;
and
display: inline-block;
have proven unsuccessful when applied to the inner div.
My goal is to have the inner div centered within the outer div, while keeping the contents of the inner div aligned to the left.