Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles & Tutorials for Work at Home Entrepreneurs
Webmasters and Small Business Owners
Get More >

Newest Articles 
CSS
Web Design
Graphic Design
Color Theory
Promotional
Make More Money
Timesavers
Business Ethics
Glossary of Terms
Reviews
Marketing
Business Resources




Name
Email

Link to Us!

CSS
Email this article  :  Printer friendly page


Cheap "Background Image" Tricks, Part 5

In a previous CSS article, Easy Borders and Backgrounds, we published a couple of ways to use an image as a background or border. This CSS tip is similar to the previous but we have taken it a small step beyond. You are also invited to download the free 9-11 logo image used in this week's example illustration.

Please review the past article first. Do you see how a single image can be used as a border by limiting it to an x or y axis with the assistance of CSS? However in the next example we added an element to instruct CSS to fix the background and only allow the text to scroll. View example HERE.

Okay, now that you understand that, add the snippet of code below to the body tag of your external style sheet to fix a background image to your page and allow "only the text" to scroll on the y axis.

body { background-attachment: fixed;
background-image: url(yourimagename.gif);
background-repeat: repeat-y;
background-position: 5px
}

Note that a background-position of 5 pixels is used to offset the image 5 pixels from the left side. Otherwise, the image would be directly against the left side of the browser window. Also, be sure the path to your image is correct. It is possible you may not need the full path - experiment.


Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.com, CSS HTML Web Site Templates with Exernal CSS and Removable Graphics. If you found our articles helpful, subscribe to our newsletter and get articles like this delivered to your inbox - FREE.

Newest Articles in
CSS
Using Multiple External Style Sheets
Resizing Form Input Boxes, Buttons, and Text with CSS
Novel Paragraph Spacing with CSS
Is Your Site Ready for the Holidays? Part 3
Is Your Site Ready for the Holidays? Part 2

 

Page copy protected against web site content infringement by Copyscape
All articles are originally authored by BasicTemplates.com. Reprints in whole or in part are not permitted. See Copyright Notice

Copyright © 1994-2006 BasicTips.com, a division of BasicTemplates.com, Web Site Templates with External CSS
The Internet's #1 Choice for HTML CSS Web Templates via a Membership. Designed using External CSS and Removable, Swap-Out Graphics.
Basic Web Templates | Website Templates | HTML CSS Templates | Web Design Templates | Web Site Templates