Unlike many people who want an image to fill out the whole screen, I only care about the image height. How can I use CSS (preferably not JavasScript) to make an image with any size, fill up to 100% of the maximum possible browser window height while keeping aspect ratio of the image, the re-sized width of the image in respect to the browser does not matter.
I'm working with this html:
<div class="images">
<img/>
</div>
Thank you so much!
This might be overkill:
.img {
position: absolute;
height: 100%;
top: 0;
bottom: 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With