Hi,
My problem is about css. I have made a fixed background to my site using this kind of technique:
Here I have defined the background image in the html file:
<html>
<head>
</head>
<body>
<img src="img/bg.jpg" alt="" id="bg" />
<div id="pagecontainer">
Al page content
</div>
</body>
</html>
css looks like this:
img#bg{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
#pagecontainer{
z-index:10;
}
At the moment my background image is 1920x 1200 and this technique scales it perfectly for all shapes & resolutions.
My problem is that the picture takes a while to load so I decided to clip it so that it can be repeated on the x-scale. But to make this work I need the picture to be fixed and stretching 100% on the y-scale.
So any ideas if this is possible? I need it to repeat width:100% on the x-scale and be fixed / scale 100% on the y-scale?
Thank you!
My problem is about css. I have made a fixed background to my site using this kind of technique:
Here I have defined the background image in the html file:
<html>
<head>
</head>
<body>
<img src="img/bg.jpg" alt="" id="bg" />
<div id="pagecontainer">
Al page content
</div>
</body>
</html>
css looks like this:
img#bg{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
#pagecontainer{
z-index:10;
}
At the moment my background image is 1920x 1200 and this technique scales it perfectly for all shapes & resolutions.
My problem is that the picture takes a while to load so I decided to clip it so that it can be repeated on the x-scale. But to make this work I need the picture to be fixed and stretching 100% on the y-scale.
So any ideas if this is possible? I need it to repeat width:100% on the x-scale and be fixed / scale 100% on the y-scale?
Thank you!