As a beginner in html, css, & bootstrap, I am facing an issue with an image that has a class of card-img-top. I can't understand why it doesn't maintain the pre-defined height of the col-sm-4 when I insert my image sized at 339x508. It seems to increase in height compared to others. Below is the code snippet:
<div class="col-sm-4">
<div class="card" style="width: 18rem; margin-bottom: 3em;">
<img src="images/fashion.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card_title">Fashion</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card" style="width: 18rem; margin-bottom: 3em;">
<img src="images/entertainment.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card_title">Entertainment</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>