I have a container that houses 3 items. My nav is set height and so is my footer. I have an image in the middle and I'm trying to contain it within its container but it overflows.
How can I contain any image size within its container and also span it so it fills 100% of the viewport height?
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.controls {
display: flex;
height: 20px;
background: purple;
}
.main-image-wrapper {
background: yellow;
}
.other-images-wrapper {
height: 60px;
background: purple;
}
<div class="container">
<div class="controls">
<p>yo</p>
</div>
<div class="main-image-wrapper">
<img src="https://c8.alamy.com/comp/CTB473/sunset-scene-long-exposure-shot-vertical-panoramic-composition-hdr-CTB473.jpg" alt="">
</div>
<div class="other-images-wrapper">
<p>hey</p>
</div>
</div>