W3C home > Mailing lists > Public > www-style@w3.org > March 2003

CSS2.1, CSS3: Background-Attachment

From: fantasai <fantasai@escape.com>
Date: Sun, 02 Mar 2003 00:48:04 -0500
Message-ID: <3E619B14.6060701@escape.com>
To: www-style@w3.org

 From http://www.w3.org/TR/2003/WD-CSS21-20030128/colors.html :
  | If a background image is specified, this property specifies
  | whether it is fixed with regard to the | viewport ('fixed')
  | or scrolls along with the containing block ('scroll').
  |
  | Note that there is only one viewport per view. If an element
  | has a scrolling mechanism (see 'overflow'), a 'fixed'
  | background doesn't move with the element, and a 'scroll'
  | background doesn't move with the scrolling mechanism.

I think the behavior specified here for 'scroll' is counter-
intuitive. As an author, I would expect the background to scroll
with the element's content just like it does for the <body>.
Indeed this is how several browsers have implemented it. [1]

As a user, I find backgrounds fixed to the content easier to
read, and while having text scroll over an unmoving background
looks cool, it is somewhat distracting. If CSS dictates that
scrolling the background with the text is no longer possible
[2], I shall be therefore be somewhat annoyed. (At the browser
manufacturers, most likely.)

I propose that 'scroll' be defined to attach the background
and the content so that they scroll together and that, if
needed, a new keyword 'attached' be defined to attach the
background to the element's box as CSS2.1 specifies for
'scroll'.

[1] Testcase:
       http://fantasai.tripod.com/www-style/2003/background-attachment.html

     With "background-attachment: scroll", these browsers scroll
     the background with the content:
       Mozilla
       IE6 Win
       IE5.5 Win
     These follow CSS2.1's wording:
       Opera 7.0
       MacIE

[2] In CSS1, 'scroll' means that the background "scrolls along
     with the content"; CSS2 changes this to "scrolls along with
     the document".
Received on Sunday, 2 March 2003 00:47:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:20 GMT