If you have a fixed div and you want the image to be put over it by stretch and scaling then you can use the following code for html and css:-
In the html page add class 'background' and 'stretch'
<div id="background">
<img src="img.jpg" class="stretch" alt="" />
</div>
with the following CSS:
#background {
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
z-index: 0;
}
.stretch {
width:100%;
height:100%;
}
And you can put the fixed in place of .stretch width: and height:
0 Comment(s)