W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [cssom] Element size/positioning information

From: Gérard Talbot <www-style@gtalbot.org>
Date: Mon, 11 Apr 2011 18:13:24 -0700
Message-ID: <e9ee97e0313be99f05d480ea0b63b04e.squirrel@cp3.shieldhost.com>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style list" <www-style@w3.org>

Le Lun 11 avril 2011 15:00, Boris Zbarsky a écrit :
> On 4/11/11 2:35 PM, Tab Atkins Jr. wrote:

>> All in all, these are the boxes that we might want to get sizing
>> information about:
>> 1. content box, ignoring scrollbars
>  > 2. content box, subtracting scrollbars
> What does this mean, exactly?  Scrollbars go into the padding,
> generally...

Scrollbar go between outer edge of padding box and inner edge of border box.

Where scrollbar(s) go is one question.

> They don't usually affect the size of the content box,
> right?

They do.

I had an old testcase on this and found it!


How scrollbar(s) can affect clientHeight|clientWidth is another question.

>> 3. content box, scrollable area
> Is this meant to be the thing scroll* currently returns?
>> 4. padding box (+/- scrollbars?  Depends on exactly where the impl
>> puts the scrollbars.)

This has been answered by CSS 2.1:

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. Any space taken up by the scrollbars should be taken out of
(subtracted from the dimensions of) the containing block formed by the
element with the scrollbars.

Tab, you may want to check my DHTML demo on these properties:


regards, Gérard
CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Tuesday, 12 April 2011 01:13:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC