Stretch image to fill div, but not skew
- by z0mbieParade
I'm trying to make an image stretch to fit inside a div. However I want it to overflow so that the entire div is filled. The div resizes with the page. I want an effect similar to the jQuery bgstretcher plugin (http://www.ajaxblender.com/bgstretcher-2-jquery-stretch-background-plugin-updated.html) , but I cannot use that plugin because I'm already using it for the background image on the page, and it seems to not work when you try and activate multiple instances of it.
So what I'm asking is for some sort of simple jQuery function that resizes an image to completely fill a div with overflow hidden, so that there are no gaps, but without skewing the image.
Edit:
http://jsfiddle.net/R7UCZ/
That's sort of what I'm after, but I want the image to fill the entire div without skewing. If the image goes out of the div a bit, that's fine, but I need it to resize with the div, which resizes with the page, both height and width.