W3C home > Mailing lists > Public > www-style@w3.org > January 1999

Scrollbars

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Wed, 20 Jan 1999 20:20:52 -0500 (EST)
Message-Id: <199901210120.UAA11883@login2.fas.harvard.edu>
To: www-style@w3.org
When CSS2 defines the overflow property [1], it doesn't specify where
the scrollbars, if used, are to be placed, and I don't think the spec
says anywhere where they should be placed.  I think this should be
specified because it could end up being a serious difference between
implementations that makes the property essentially unusable because of
visual messiness (i.e., one browser could change the padding when
something is scrolled and one could place the scrollbar on top of the
padding).

Here are two interesting situations to think about when deciding how
this should be done:

1) An element that has margins, border, and padding, and a scrollbar.

2) An element that has padding and a positioned non repeating
   background image in the upper-right (vertical scrollbars only) or
   lower right corners.

3) An element that has margins, padding, and border-width of 0.

I think the scrollbar should be placed between the border and the
padding (on the appropriate side, which depends on whether it is
horizontal or vertical and possibly on the direction of the text) so
that the padding edge, rather than touching the inside of the border,
touches the scrollbar.

This would handle the case of background images properly, and would
also make sense where there are margins, borders, and padding.  I think
the scrollbar should definitely touch the border in some way, since
otherwise scrollbars could end up floating in the middle of nowhere.
It would also handle the case of something that has margins, padding,
and border set to zero.

Having the scrollbar overlap the padding, border, or margin could
create problems in the case of all three of the above being zero,
especially with elements that have "overflow: auto", where it would be
undesirable to create extra room to allow for a scrollbar that may or
may not exist (especially since the scrolling mechanism does not have
to be a scrollbar).

David Baron

[1] http://www.w3.org/TR/REC-CSS2/visufx.html#overflow
Received on Wednesday, 20 January 1999 20:20:54 GMT

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