Wells-it.com - Web Hosting

Background Not Moving

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
Lukster's picture

They have: 64 posts

Joined: Sep 2001

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."

Online Data Backup? I'd like to see that!

He has: 1,016 posts

Joined: May 2002

Add bgproperties="fixed" to your tag.

They have: 447 posts

Joined: Oct 1999

or

<BODY BACKGROUND="mybackground.jpg" STYLE="background-attachment: fixed;">

'

Suzanne's picture

She has: 5,512 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's picture

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! Wink