I need to make the img tag width and height 100% inside overflow hidden div while maintaining the aspect ratio.
What I reached for is putting the image within overflow hidden div And the image is max-width 100% and auto height.
<div id="foo">
<img src="http://www.engineering.com/Portals/0/BlogFiles/swertel/heart-cloud.jpg" />
</div>
but the problem i'm facing is not go height 100%
Look the code in action http://fiddle.jshell.net/TARwL/
And get close look at the div#cover is 100% width and height is perfect look and i would like to see my code do the same
I can't use the background-size:cover method because beside is not working in older browsers, I can't click right and save the image and this is important to me