I'd like to center an image (that changes dimensions according to the screen size) horizontally vertically in a div. That div is positioned absolute and has a height of 100%. Under that div, another div is placed.
I made a visual example
    <body>
    <div id="wrapper">
    <div id="div1">
        <div id="center">
            <img src="http://www.vilna.nl/wp-content/uploads/2013/10/test.jpg">
        </div>
    </div>
    <div id="div2">
    You can't see this without scrolling
    </div>
</div>
</body>
I want to center the test image vertically in the red div.
Thanks!
 
     
     
    