After trying out the jquery.backgroundSize.js plugin, I ran into issues getting it to work in IE8.
I followed the steps from the official website and tested on various browsers like IE9 and Firefox, but nothing seemed to happen on IE8.
css:
#main{
background:url('parthenon.jpg') no-repeat;
margin:20px;
height:200px;
width:200px;
border:1px solid;
}
html:
<div id="main">
background
</div>
js:
$(function() {
$("#main").css({backgroundSize: "contain"});
});