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

Re: scroll bar size in width calculations

From: Brad Kemper <brkemper@comcast.net>
Date: Sat, 5 Jan 2008 15:44:56 -0800
Message-Id: <6EB69E69-82BB-4950-83FB-57358EF93ACB@comcast.net>
Cc: Andrew Fedoniouk <news@terrainformatica.com>, fantasai <fantasai.lists@inkedblade.net>, Alex Mogilevsky <alexmog@exchange.microsoft.com>, CSS Style <www-style@w3.org>, Sam Fortiner <samfort@microsoft.com>, Harel Williams <harelw@microsoft.com>, Scott Dickens <sdickens@exchange.microsoft.com>, Boris Zbarsky <bzbarsky@MIT.EDU>
To: Rossen Atanassov <ratan@windows.microsoft.com>

On Jan 5, 2008, at 12:55 PM, Rossen Atanassov wrote:

> Now however the containing block as changed size to (100 - SB x 100  
> - SB) which you can't really see since the content inside has fixed  
> size. In this case the vertical scroll by the way causes the  
> horizontal scroll to appear as well.

In some browsers the horizontal scroll bar appears whenever the  
vertical one does, but this seems wrong to me. With overflow:auto,  
there is supposed to be "a scrolling mechanism to be provided for  
overflowing boxes"[1]. If the block is not overflowing horizontally,  
why is there a horizontal scrollbar in some browsers? I know the  
scrolling mechanism itself is UA dependant (Safari for iPhone has  
scrollbars that only appear translucently when actually scrolling,  
and they do not affect width and height of the content at all), but I  
wish we could change that line to the following:

auto
The behavior of the 'auto' value is user agent-dependent, but should  
cause a horizontal scrolling mechanism to be provided for  
horizontally overflowing boxes, and  should cause a vertical  
scrolling mechanism to be provided for vertical overflowing boxes.

I usually resort to "overflow-x: hidden;" so that I can get  
consistent results, predictable content heights, and no useless UI  
elements taking up space when they are not needed.

As I right this e-mail using mail.app in Mac OS X, there are no  
vertical scrollbars unless I make the editing window short enough to  
need them, and would only have horizontal scrollbars if I had  
unbreakable content (such as an image) that was wider than the  
editing window. It is similar in concept to overflow:auto.

[1] http://www.w3.org/TR/CSS21/visufx.html#overflow
Received on Saturday, 5 January 2008 23:51:14 GMT

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