Click to See Complete Forum and Search --> : background:fixed; problem


Zach Elfers
01-22-2003, 11:52 AM
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?

jeffmott
01-22-2003, 03:24 PM
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.

toicontien
02-04-2003, 10:24 PM
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.

nkaisare
02-05-2003, 10:22 AM
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;
}

Zach Elfers
02-05-2003, 10:45 AM
Thanx for the help. I will try them.