I am working with a <div>
container that occupies 80% of the screen on a responsive page. Within this <div>
, I am attempting to display an image that is sized at 400 x 400 pixels.
My objective:
As the screen width increases: The
<div>
's width will expand, with the image's width increasing to a maximum of 400px.When the screen width decreases: The
<div>
's width will shrink. The image's width will begin to decrease once the screen's width falls below 400px.
You can view my code on JS Bin.
Any suggestions or ideas?