No replies
Zionn
Offline
newbie
Last seen: 12 years 5 weeks ago
Joined: 2009-08-20
Posts: 2
Points: 0

Hi,

I have made a fixed background to my site using this kind of technique:

1. I have defined the background image in the html file:

Al page content

2. 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 is too big and takes a while to load so I decided to clip and repeat on the x-scale. But to make this work I need the picture to be fixed on the y-scale so that it follows when scrolling down, and at the sametime be repeating itself on the x-scale.

I need it to repeat-x width:100% on the x-scale and be fixed 100% on the y-scale?

Is this somehow possible?

Thank you!