Image size 100 % - CSS HELP

lionel.web

Reputable
Joined
Aug 11, 2014
Messages
100
Reaction score
0
FP$
6
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???
 
why don't you make on image code?
<img src=""images/image1.jpg"" height="100px" width="100px">

the result will same.
 
Back
Top Bottom