/    Sign up×
Community /Pin to ProfileBookmark

background:fixed; problem

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?

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@jeffmottJan 22.2003 — 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.
Copy linkTweet thisAlerts:
@toicontienFeb 05.2003 — 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.
Copy linkTweet thisAlerts:
@nkaisareFeb 05.2003 — Or maybe this
<i>
</i>body {
background: #080 url(patern.gif) fixed;
margin:0px;
}


To prevent tiling:
<i>
</i>body {
background: #080 url(patern.gif) no-repeat fixed;
margin:0px;
}
Copy linkTweet thisAlerts:
@Zach_ElfersauthorFeb 05.2003 — Thanx for the help. I will try them.
×

Success!

Help @Zach_Elfers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...