Free AdviceGet Free Advice
Home | Get advice | Give advice | Topics | Columnists | - !START HERE! -
Make Suggestions | Sitemap

Get Advice


Search Questions

Ask A Question

Browse Advice Columnists

Search Advice Columnists

Chat Room

Give Advice

View Questions
Search Questions
Advice Topics

Login

Username:
Password:
Remember me
Register for free!
Lost Password?

Want to give Advice?

Sign Up Now
(It's FREE!)

Miscellaneous

Shirts and Stuff
Page Backgrounds
Make Suggestions
Site News
Link To Us
About Us
Terms of Service
Help/FAQ
Sitemap
Contact Us


background image


Question Posted Saturday February 17 2007, 10:42 pm

i know how to put in an image for the background for a website but, how do you make it stay still? i have stripes as the background and i dont like it to move with the text. thanks.

[ Answer this question ]
Want to answer more questions in the Technology category?
Maybe give some free advice about: Internet & Web Design?


theymos answered Sunday February 18 2007, 12:31 am:
<html>
<head>
<style type="text/css>
body{
background-attachment:fixed;
background-image:url(your image);
}
</style>
</head>
<body>
your stuff
</body>
</html>
<!--end of html-->

You can remove background-image in <style> if you want, and use <body background=>, but the W3C recommends you use CSS. So this is added in the head section:

<style type="text/css">
body{background-attachment:fixed}
</style>

[ theymos's advice column | Ask theymos A Question
]




PunkieFreak4690 answered Sunday February 18 2007, 12:30 am:
In the background properties section of your website code, is there a spot where it says "background-attachment:"? If so, next to the colon, put "fixed" and it keeps the background in place. If not, add that to your background settings "background-attachment: fixed;" and that should help.

Also, to make it more aligned, you can make a setting to align in the center, or bottom right, for example. "background-position:bottom right;"

I added that because some times when you do put the background in "fixed" mode, it some times aligns to top center or bottom left, and you probably want it to align center to make it look balanced.

Hope I helped =]

[ PunkieFreak4690's advice column | Ask PunkieFreak4690 A Question
]

More Questions:

<<< Previous Question: back nee
Next Question >>> dress

Recent popular questions:
Want to give advice?

Click here to start your own advice column!

What happened here with my gamer friends?

All content on this page posted by members of advicenators.com is the responsibility those individual members. Other content © 2003-2014 advicenators.com. We do not promise accuracy, completeness, or usefulness of any advice and are not responsible for content.

Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content.
Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.

[Valid RSS] eXTReMe Tracker