Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backgrounds 1

Status
Not open for further replies.

kenbw

Programmer
May 2, 2002
39
US
Is there a way to anchor the background of a page and just have the text scroll? I thought I've seen this before and would like to do it as I think it makes for a nicer presentation. Thanks for the help.

Ken
 
Add this to your css file

.background
{ background-attachment: fixed;
background-image: url('images/background.gif');
background-repeat: no-repeat;
background-position: left bottom
}
Then add the following line to your body tag

p class="background"

Greg Palmer

----------------------------------------
Any feed back is appreciated.
 
use css and set the background-attachment property to scroll

MrBelfry
 
Try putting bgproperties=&quot;fixed&quot; in your <body> tag. This should work, although I'm not sure if there are any browser compatibility issues with it. There probably are...there is with everything else! :)

Hope This Helps!

Ecobb
- I hate computers!
 
Whoa! Everyone answered at once!

Hope This Helps!

Ecobb
- I hate computers!
 
Unfortunately not all of us got it right

MrBelfry
 
The first answer is the best although the css code quoted should be put in the body definition as opposed to the paragraph, i.e.

body
{ background-attachment: fixed;
background-image: url('images/background.gif');
background-repeat: no-repeat;
background-position: left bottom
}

Cheers

Nige
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top