I have an html page like this :
<html>
<head>
<style>
.main {
max-width:500px;
min-height:500px;
margin:auto;
}
.image-container {
width:100%;
background-color:black;
min-height: 200px;
height:300px;
}
img {
object-fit: contain;
height:200px;
}
</style>
</head>
<body>
<div class="main">
<div class="image-container">
<img src="https://i.gyazo.com/3a4b9b23d8d1a179b75472d58bc55fe3.jpg" style="width:100%"/>
</div>
</div>
</body>
</html>
this object-fit perfectly fine on google chrome and firefox , but unfortunately not in IE . I don't want to use as background image as I will use this image in a carousel in future ? is there any alternative so that I fit an image in a fixed height div without stretching and overflowing ? Noted : Object-fit : contain perfectly serve my requirements but failed on IE .