Back to main page!

Knowledgebase Home Knowledgebase Home
Search the Knowledgebase Browse by Category
How do I stop page backgrounds from scrolling or repeating?
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful
The old-fashioned way to set a page background image is to set the bgsrc attribute of the body element, like this:
Body of page goes here
The trouble is that if the page goes on long enough, or is wide enough, the image background.png will be repeated ("tiled") throughout the page. Also, if the user scrolls the page, your background image will also scroll. If you do not want either or both of these things to happen, you will need to take a more modern approach, using styles rather than the bgsrc attribute:
Body of page goes here
Styles provide more precise control and are the preferred method in modern browsers. One can also do this even more elegantly using a style sheet separate from the page.

For a useful and detailed discussion of page backgrounds, see the background tutorial, on HTML Goodies.

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.

Home | Web Design | Print Advertisements | Banner Design | Other Services


Copyright © 2003 Digital Arts Group @ FrankGonzalez.com. All Rights Reserved
About Us | Disclaimer | Privacy Policy | Terms of Use | Design Team | Sitemap