I am trying to replicate the same effect that this website has: http://www.knockknockfactory.com/
When the browser width is resized the image automatically gets smaller but the height of the area in which it occupies stays the same.
When i try to replicate this, my image also gets smaller but the height changes?
My code so far is:
<div id="image"><img src="cover.png" /></div>
I've used Perfect Full Page Background Image to accomplish this on a previous site.
You can use background-size: cover; if you only need to support modern browsers.