DomainsToBuy.com
Support Forums
Free Web Hosting Signup
Free Hosted Message Board
FREE HOSTING SIGN UP NOW MEMBERS LOGIN MESSAGE BOARD SUPPORT
Free Web Hosting
Free Hosting
Sign Up Now
Members Login
Message Board
Support
Resources
FAQ
Link Directory


Free Hosting > Support > Designating Background Attachment Using CSS

Designating Background Attachment Using CSS

Background attachment, contrary to what I believed when first learning CSS, has nothing to do with attaching a file to a webpage as one would do with an email. What background attachment is, however; is a designation which determines whether your set background image moves with the rest of the page when scrolled, or remains static.

Any element which has a background image designated for it may also have a background-attachment designation.

Let's take a look at some CSS background attachment style settings.

p	{background-attachment:scroll;}
td	{background-attachment:fixed;}

There are only two style attributes for the background-attachment element. These are scroll and fixed. Scroll means that the image moves with the HTML element it is background for, when scrolled. Fixed means that the image doesn't move, even when the element does.

By default (if you entered no style setting for this element, this is what would happen) the images scroll. Therefore, the only reason to designate a background-attachment style would be if you wanted it to remain fixed.

You should now have an understanding of what the background-attachment element controls and know how to set the attributes for this element using CSS.


Copyright ©2004-2005 DomainsToBuy.com