How can I centre a large image to the browser window, so that if it is wider than the window it will still be centred?
See: http://carolineelisa.com/rob/
I d
Honestly, the best way to do it is with a background image. Since you're going to be using javascript to change the image, you can go ahead and add a little more to change the height as well. To do so, load the image into an invisible div (style="position:absolute; top:-3000px; left:-3000px;") in addition to setting it as a background-image. You can then use javascript to get its height from the img tag inside the invisible div.