W3C home > Mailing lists > Public > public-css-testsuite@w3.org > March 2010

Microsoft's position-relative-005.htm test assertion to correct

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 15 Mar 2010 17:38:14 -0700
Message-ID: <04f26beb8260b10f45713bbf7baddcba.squirrel@cp3.shieldhost.com>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Cc: "Arron Eicholz" <Arron.Eicholz@microsoft.com>
Hello all,





<meta content="Relatively positioned element with the left specified
offsets the element from the left of the containing block."

                height: 1in;
                width: 1in;
                background: orange;
                position: absolute;
                background: blue;
                left: 1in;
                position: relative;

    <p>Test passes if the blue box is to the right of the orange box.</p>
        <div id="div1"></div>
        <div id="div2"></div>


When left property is given a value with absolute unit (eg 15px, 1in,
2cm, 50mm, 58pc, etc), then the offset is relative to the box's normal
position, the position of the box if it had been static. There is no
reference in the spec to the containing block for relatively positioned
elements offset with absolute length values. The offset is independent
of its containing block.

The box's position is calculated according to the normal flow (this is
called the position in normal flow). Then the box is offset relative  to
its normal position.
section 9.3.1

For relatively positioned boxes, the offset is with respect to the left
edge of the box itself.

Things are a bit different when left property is given a value with a
percentage unit (eg 30%). Then, it refers to width of containing block
and, if it can be computed, then it gets resolved to an absolute length
value as well and the relatively positioned box is offset just like with
other absolute length values.

The "from the left of the containing block" chunk of the assert is
incorrect, is wrong.

I propose to change

<meta content="Relatively positioned element with the left specified
offsets the element from the left of the containing block."

to this:

<meta content="A relatively positioned element with the left specified
offsets its own box's normal position (its position according to the
normal flow) by the value given by the left property." name="assert">

Maybe there is a better wording for this.

One other thing. The help link
<link rel="help"

is inaccurate, unhelpful. I propose

<link rel="help"
<link rel="help"

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (alpha 1; January 27th 2010):

CSS 2.1 test suite contributors:
Received on Tuesday, 16 March 2010 00:38:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:14 UTC