Re: scroll bar size in width calculations

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 UTC