Image size 100 % - CSS HELP

Hi!

I try to do this:

I have an element, and i want the background image to be all over the background.

e.g.
<div id="mydiv">
</div>

#mydiv{width:100%; height:100%;background:url(images/image1.jpg) no-repeat; background-size:cover;}

If i want, to do this:

<div id="mydiv">
<img src="images/image1.jpg">
</div>

#mydiv{width:100%; height:100%;}
#mydiv img{}

How can i make the same effect, with the image, to be cover all over the div????
But, without background-size:cover. Is it possible???
 
Back
Top