I'm currently utilizing Bootstrap and the img-responsive
class. My goal is to center an image within a div, which works flawlessly. However, I am facing an issue with certain screen sizes where I want the div/image to have a minimum height. Whenever I set the min-height
, the image stretches vertically to meet this requirement but does not adjust its width, causing distortion.
CSS:
img#main-im14 {
min-height: 500px;
width: 100%;
}
HTML:
<div class="header-content-inner">
<img id="main-im14" src="img/image.png" class="img-responsive">
</div>
Any suggestions on how to resolve this issue?