I have an absolutely positioned div with a percentage height and an image in it. That image has a height of 100% and width of auto. When the height of the viewport is adjusted the absolute div will not adjust it's width and the images will either get cut off or you'll see the background of the div.
Example: http://jsfiddle.net/Y5Cr7/
CSS
div {
position: absolute;
overflow: hidden;
height: 50%;
bottom: 80px;
left: 5%;
background: blue;
}
img {
height: 100%;
width: auto;
display: block;
}
HTML
<p>adjust the height of the viewport</p>
<div>
<img src="http://lorempixel.com/400/200" />
</div>