Have a box increase its size based on its content

by Alessandro Vernet

HTML

<div>
    <img src="http://placekitten.com/g/400/100"/>
</div>

CSS

div {display:table; background-color: #999; width: 100% }
img { padding: 1em }