Background Not Moving
Heyas all,
I was wondering if anyone can direct me towards a script or tutorial in how to keep my background still when you scroll the page down....
Thanks in advance
"Whenever you do a thing, act as if all the world were watching."
zollet posted this at 10:43 — 4th August 2002.
He has: 1,016 posts
Joined: May 2002
Add bgproperties="fixed" to your tag.
ROB posted this at 12:52 — 4th August 2002.
They have: 447 posts
Joined: Oct 1999
or
<BODY BACKGROUND="mybackground.jpg" STYLE="background-attachment: fixed;">
Suzanne posted this at 20:44 — 4th August 2002.
She has: 5,507 posts
Joined: Feb 2000
Preferably, the style would be in a global stylesheet, not in the actual body tag. Or in a local stylesheet if it's only one page with a fixed background.
body {
background-image: url(mybackground.gif);
background-attachment: fixed;
}
Why is this the preferred method? Because of forward compatibility. As browsers support only higher and higher levels of HTML, any pages left in legacy states will devolve into raw, unstyled, unformatted text. Using a global stylesheet allows you to leave the content in basic markup only, and control that markup through the stylesheet as the web evolves.
openmind posted this at 20:00 — 5th August 2002.
He has: 945 posts
Joined: Aug 2001
Ya know I love it when Suzanne answers even a simple question cause she justify's herself as well. Why can't more women be like that???
...nuff butt kissing now!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.