I am a bit new to web development and am unable to figure out how to limit the size of an image.
I am trying to create a card using bootstrap, I am using bootstrap row class and dividing my card into 2 parts (col-md-3 and col-md-6) - one for image and other for data and I have an image of unknown specifications. What I expect is that the image should take up the entire space available in col-md-3 (height is constant 200px) and in sm and xs size it should take up the entire row. I have no problems if the image stretches.
Here is the code snippet. https://jsfiddle.net/nLndf1rm/
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<ul>
<li>
<div class="card" style="background-color: grey; float: left; margin: 15px">
<div class="row">
<div class="col-md-3">
<img style="width: 100%; width: 250px; height: 180px ;display: block; float: left" src="https://static01.nyt.com/images/2016/12/15/world/15echevarria-obit/15echevarria-obit-articleLarge.jpg" alt="Card image cap">
</div>
<div class="col-md-9">
<h6>A
Bishop Javier Echevarría, Leader of Opus Dei, Dies at 84
</h6>
<div>
<p style="color: black;">
Bishop Echevarría was the prelate of Opus Dei, the disciplined and influential global Roman Catholic organization, since 1994.....
<br/>
</p>
</div>
</div>
</div>
</div>
</li>
</ul>
Please help me. I don't mind re-writing the entire code for this.