page Background

They have: 7 posts

Joined: Apr 2004

Hi

Is there anyway i can keep the background of a page stay still while scrolling the page? I work in dreamweaver 4 & MX.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

I don't know how to do it in DW specifically, but the code in the CSS is:

background-attachment : fixed;
background-position : top;
'

You can change the position, too.

DaveyBoy's picture

They have: 453 posts

Joined: Feb 2003

if ur not using css, put

bgproperties : fixed
'

in your body tag.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

lol @ Daveyboy -- bgproperties="fixed"

Busy's picture

He has: 6,151 posts

Joined: May 2001

bgproperties is an IE tag - use CSS

He has: 578 posts

Joined: Jun 2004

Does this also apply to images, divs, spans and text?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

lol, does what apply? That they are ie only? Or the css property? If you mean the CSS property, anything that has the ability to have a background (all?) can use it, yes.

He has: 578 posts

Joined: Jun 2004

I guess I want to know if it's possible to make a div stay put, like have a nav bar that doesn't move. Basically simulate frames using a fixed position.

And, completely off topic, how do you make a code area?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

That particular code is to fix backgrounds relative to the container... and this is really only useful for body.

What you want is position:fixed for divs and such. It's like absolute position, except it's fixed relative to the window. This is not supported by IE -- you'll have to use a CSS/Javascript hack for that.

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.