I cannot figure out why this task is proving to be difficult. My goal is to insert an image into a container in such a way that the image adjusts its size responsively. This means that as the width of the column decreases, the image should also shrink proportionally. Currently, it does resize with the width but maintains its height, resulting in a stretched appearance.
https://codepen.io/anon/pen/vmZKyM
<div class="container-fluid">
<div class="col-md-8 offset-md-2">
<div class="row">
<div class="col-md-4 offset-md-2">
<div class="row">
<p>Left column</p>
<img src="http://placehold.it/600x400" />
</div>
</div>
<div class="col-md-5 offset-md-1">
<div class="row">
<p>Right column</p>
<img src="http://placehold.it/700x400" />
</div>
</div>
</div>
</div>
</div>
Since I am unsure about the aspect ratio of the image (though I know it in this case), I am unable to use the padding-bottom
method typically employed for images.
Can anybody provide a solution for achieving this?