CSS Property - Background Attachment

Value: scroll | fixed
Initial: scroll
Applies to: all elements
Inherited: no
Percentage values: N/A

If a background image is specified, the CSS property "background-attachment" determines if the image is in a fixed position in relation to the screen or if it scrolls with the content.

Example:

body{
background-color: red;
background-image: url(image.gif);
background-repeat: repeat-y;
background-attachment: fixed;
}

CSS1 core: UAs may treat "fixed" as "scroll". However, it is recommended they interpret "fixed" correctly, at least on the "HTML" and "BODY" elements, since there is no way for an author to provide an image only for those browsers that support "fixed". (CSS1 conformance)

Check Out Our Sponsors
Check Out Our Host

ANHosting

Free CSS.com is proud to be hosted by ANHosting.com. US Based Support starting at only 23 cents a day.
Use the coupon code FREECSS for 3 free months of hosting. Click Here »

Bookmarks
RSS Feed    Search

Looking for FREE HTML email templates - Sign up for a FREE account with MailChimp today!