I want to fit an image inside some divs and make it as big as possible without changing the aspect ratio. Setting max-height and max-width to 100% on both the image and its parent does not work and the image overflows (I guess because the parent does not really have a width or height so the image can not resize to it?).
<div class="block">
<div class="row">
<div class="col-xs-9">
<div class="thumbnail">
<img class="placeholder" src="https://unsplash.it/900/600" alt="">
</div>
</div>
<div class="col-xs-3">
</div>
</div>
</div>
Edit:
I will clarify what I really want to achieve later this evening when I have time to write.