StackOverflow community.
I want an image to fill the entirety of a box that's 100% width and 450px height.
<div class="homepics">
<img src="./homepic.jpg" alt="Home Picture" />
</div>
.homepics {
width: 100%;
height: 450px;
}
I did my best to find an answer, but in the examples I've seen the box always has a determined width and height, which does not apply to my case. Or maybe it can if I knew how to make the box take 100% of the width of the viewer's browser without having to use the 100% value on the width attribute.
So, if I want the homepic.jpg to fit my .homepics div, how do I proceed?
I'd appreciate any help on this.