W3C home > Mailing lists > Public > www-style@w3.org > February 2009

Re: Proposal for overflow painting order

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 05 Feb 2009 11:22:53 -0800
Message-ID: <498B3C8D.3090702@terrainformatica.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: benjo316@gmail.com, "www-style@w3.org List" <www-style@w3.org>, David Hyatt <hyatt@apple.com>

Tab Atkins Jr. wrote:
> On Thu, Feb 5, 2009 at 12:33 PM, Benjamin <benjo316@hotpop.com> wrote:
>> On Thu, Feb 5, 2009 at 12:07 PM, Tab Atkins Jr. <jackalmage@gmail.com>
>> wrote:
>>> I'm not an expert on the overflow painting rules, but the current UA
>>> default behavior makes sense to me, and more importantly, *can't be
>>> reproduced easily through other methods.*.  On the other hand, putting
>>> it unilaterally over or under the overlapping content can be easily
>>> done through z-index.  It's not an absolutely ideal solution, but
>>> it'll work for the vast majority of cases, and is very simple.
>> I'm not sure why, but as shown by the attached html, simply using z-index
>> does not seem to create the desired effect. I cannot get the first div over
>> the second, and I cannot get the fourth div over the fifth; even if I
>> specify a z-index on all six divs, it still does not work.
> It's because z-index has no effect on position:static elements, which
> of course those <div>s are by default.  Make the 2nd and 5th <div>s
> position:relative, and your example works.
I think you've missed the point.

position:relative is moving the element onto completely different stack 

All position:relative elements will move it on *top* of canvas layer. No 
matter what value of z-index it has.
Thus you cannot move positioned element underneath its static neighbors 
by using z-index.

But style="margin: -10px 0" when applied to static element moves its top 
side over its siblings [on canvas] and its bottom
underneath its siblings [that are on the canvas layer].  A bit strange 
structure of space/time continuum if to speak about intuition.


Andrew Fedoniouk.

Received on Thursday, 5 February 2009 19:30:20 UTC

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