Back to CSS1 Reference | CSS1 Properties
Prev background | Next background-color


Property
background-attachment
Values
scroll, fixed
Initial
scroll
Inherited
no

If a background image is specified, the value of 'background-attachment' determines if it is fixed with regard to the canvas or if it scrolls along with the content.

      BODY { 
      background: red url(pendant.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'.

Log in or register to write something here or to contact authors.