background:fixed; problem

liunx

Guest
I have a page which uses:

body {
background:url("pattern.gif") fixed;
background-color:#008800;
margin:0px;
}

It works fine. Then I have another page which has EXACTLY the same thing. I have even checked over it like a thousand times, character for character. I even copy and pasted it from the original site. THE BACKGROUND ISN'T FIXED! What is wrong? I am displaying the page I want a fixed background on in an iframe. Could that have anything to do with it?You havn't really told us anything more than "it should work but it doesn't." Where is the page that doesn't work? Otherwise my guess (from many many possibilities) is that the background-attachment gets redefined later in the cascade.Try this for your style sheet:

body {
background-image: url(patern.gif);
background-attachment: fixed;
background-color:#008800;
margin:0px;
}

Use that for both your iframe and the other page.Or maybe this

body {
background: #080 url(patern.gif) fixed;
margin:0px;
}


To prevent tiling:

body {
background: #080 url(patern.gif) no-repeat fixed;
margin:0px;
}Thanx for the help. I will try them.
 
Back
Top