I am working on a fluid layout where I have a div that always matches the height and width of the browser window, regardless of resizing. Essentially, this div is set to be 100% height and width of the browser window.
Inside this div, I have an image that is supposed to fit 100% of its parent's width and height, making it fullscreen. However, currently when the browser window is enlarged, the image exceeds the size of its parent, causing the right side and bottom of the image to get cut off.
Is there a way to ensure that all edges of the image are cut off when the browser window is enlarged? I believe what I'm looking for is to vertically center the image within its parent.
Keep in mind that the widths of all images and divs are calculated using percentages.
Here is the link to my existing code: http://jsfiddle.net/PfzQ8/4/
Edit: The jsfiddle provided is not the problematic code, but rather the current code that I would like to build upon.