I have been trying to get a div to fit its content here. I have tried many shrinkwrapping methods, but none have worked.
<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 failed when applied to the inner div.
I would like the inner div to be centered in the outer div, but have the contents of the inner be left aligned.