Bobby Jack wrote:
> --- On Thu, 7/16/09, Alan Gresley <[email protected]> wrote:
> 
>> Bobby Jack wrote:
> 
>>> ... and an appropriate z-index :)
>>>
>> None is required for position: fixed. You're positioning,
>> not layering (altering the paint order).
> 
> Not if there's a relatively-positioned element on the page, in my experience:
> 
> http://www.fiveminuteargument.com/fixed-position-z-index
> 
> Is this a bug or expected behaviour?
> 
> - Bobby


Hello Bobby,

This is indeed expected. You are partly correct and thank you for 
catching me out. I never considered that the original poster (Ellen) had 
anything else positioned. The behavior which you have linked to is 
demo'd here.

<http://css-class.com/test/css/visformatting/layers/pos-ab-and-pos-rel-layer1.htm>


By changing the source order of the HTML alone will paint the flow of 
elements differently.

<http://css-class.com/test/css/visformatting/layers/pos-ab-and-pos-rel-layer2.htm>


Source ordering (visually layering / painting) can be achieved without 
any absolute positioning or z-index.

<http://css-class.com/test/css/shadows/source-ordered-box-shadow.htm>


Absolute or fixed positioning establishes a new 'Block Formating 
Context' [1]. Relative positioning establishes a 'Containing Block' and 
in some cases a new 'Block Formating Context' [2] [3].

None of this changes the painting order (layer) which is painted by 
order of the flow.

Z-index creates a new 'Stacking Context' [4]. You are confusing this 
with the natural painting order generated by elements in the normal flow.


1. <http://www.w3.org/TR/CSS21/visuren.html#block-formatting>
2. <http://www.w3.org/TR/CSS21/visuren.html#containing-block>
3. <http://www.w3.org/TR/CSS21/visuren.html#relative-positioning>
4. <http://www.w3.org/TR/CSS21/visuren.html#layers>


BTW, I, others on this list and those on the CSS working group list 
tackled such terms as 'painting order', 'stacking order', 'stacking 
context' and 'block formatting context' in 2007 (I'm still somewhat 
confused). Ingo Chao seemed to have visualized this stacking / painting 
dilemma quite well and I guess what is in the spec regarding all this is 
just left as it is.

Rewriting the specs to conform to how browsers handle this stacking / 
painting is a challenge that none have ventured near. Enough said. I 
will leave this to some else to explain better.

;-)


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to