W3C home > Mailing lists > Public > www-style@w3.org > December 2007

scroll bar size in width calculations

From: Alex Mogilevsky <alexmog@exchange.microsoft.com>
Date: Fri, 21 Dec 2007 12:36:26 -0800
To: "www-style@w3.org" <www-style@w3.org>
CC: Sam Fortiner <samfort@microsoft.com>, Harel Williams <harelw@microsoft.com>, Scott Dickens <sdickens@exchange.microsoft.com>
Message-ID: <04F36FB4ED0F85459AA447F72711526F012126B35A1C@DF-GRTDANE-MSG.exchange.corp.microsoft.com>
We are trying to understand the standard rules for sizing with overflow:scroll.

Per the CSS 2.1 spec, section 11.1.1, there is a reference to exactly where the scrollbar goes as well as a reference to how the scrollbar impacts the box model calculations:

In the case of a scrollbar being placed on an edge of the element's box, it should be inserted between the inner border edge and the outer padding edge. The space taken up by the scrollbars affects the computation of the dimensions in the rendering model.

The visual model formatting details has details such as the following in 10.3.3 for Block-level, non-replaced elements in normal flow:

'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + scrollbar width (if any) = width of containing block

None of the above rules appear to suggest that specified 'width' is changed when scrollbar is present and the settings are otherwise not overspecified.

However the attached example is rendered identical in all browsers we try. Is there something in the spec that requires subtracting scrollbar width from 'width', or is there language elsewhere which gives UA freedom to do so?

Thanks
Alex



Received on Friday, 21 December 2007 20:36:45 GMT

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