Hi! > The issue I'm facing with is the fact that the cards can be stacked. > As an example, please go to this snippet: http://jsfiddle.net/QxjNc/9/ > > The card C is the "child" of B, thus when drag'ndropping B, I drag'ndrop > also C. > > Now to reproduce the problem: > 1. Drag C to the right (the dropzone becomes pink) and drop it. All is ok. > 2. Drag B (+C) to the right and drop it. All is ok. > 3. Drag C to the right and... tadaaa ! C is dragged *in the back* of > the right part, whereas it was not the case at step 1. > > How could you explain that? How can it be fixed? > > http://www.tek-tips.com/viewthread.cfm?qid=1467777
http://www.w3.org/wiki/CSS_absolute_and_fixed_positioning#Local_stacking_contexts https://developer.mozilla.org/en/Understanding_CSS_z-index Every element whose z-index is specified as an integer establishes a new, “local”, stacking context in which the element itself has stack level 0. This is the difference I mentioned before between z-index: auto and z-index: 0. The former doesn’t establish a new stacking context, but the latter does. When an element establishes a local stacking context, the stack levels of its positioned descendants apply within this local context only. These descendants can be re-stacked with respect to one another, and with respect to their parent, but not with respect to the parent’s siblings. It’s like the parent forms a “cage” around its descendants, so that they cannot escape from it. The descendants may be moved up and down within this cage, but they can’t get out of the cage. The parent and its descendants will form an indivisible unit within the stacking context that surrounds the parent. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/phpMTpCP2B0J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
