Re: scroll bar size in width calculations

What happens with the initial containing block? What about the
viewport's scrollbar?

On Dec 21, 2007 12:36 PM, Alex Mogilevsky
<alexmog@exchange.microsoft.com> wrote:
>
>
>
>
> 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



-- 
Monkey, so they say, is the root of all people today.

Received on Tuesday, 8 January 2008 23:18:59 UTC