Let's say I have two divs, each with a number of items in it arranged by z-index.
If one div has a greater z-index than the other, will ALL its children be placed above ALL the other div's children, or will each child be placed according to its own z-index, without regard to how the parents are grouped?
I guess this is turning into an ASP question now, but I'm still having some major problems. By "stack order," what exactly do you mean? I have divs and Panels mixed (I tried to use Panels only for those things I needed to handle events on, or to add user
controls to). Am I doomed?
Specifically, I have a div header, which spans the whole screen, then my form object (runat server), then a couple divs, then an asp:Panel. In some cases, the item with the higher z-index is not displaying on top of other controls. I want my login control
to display on the header, and have given it a higher z-index but to no effect.
bennyboy1973
Member
7 Points
37 Posts
z-index question
Jan 08, 2013 12:17 AM|LINK
Let's say I have two divs, each with a number of items in it arranged by z-index.
If one div has a greater z-index than the other, will ALL its children be placed above ALL the other div's children, or will each child be placed according to its own z-index, without regard to how the parents are grouped?
urenjoy
Star
12027 Points
1807 Posts
Re: z-index question
Jan 08, 2013 07:10 AM|LINK
1. z-index only works on positioned elements (position:absolute, position:relative, or position:fixed).
2. An element with greater stack order is always in front of an element with a lower stack order.
3. z-index: auto means Sets the stack order equal to its parents. This is default
If child has their own z-index defined then that will be considered.
bennyboy1973
Member
7 Points
37 Posts
Re: z-index question
Jan 08, 2013 10:20 PM|LINK
Perfectly explained. Thanks.
bennyboy1973
Member
7 Points
37 Posts
Re: z-index question
Jan 09, 2013 11:14 AM|LINK
--edit--
I guess this is turning into an ASP question now, but I'm still having some major problems. By "stack order," what exactly do you mean? I have divs and Panels mixed (I tried to use Panels only for those things I needed to handle events on, or to add user controls to). Am I doomed?
Specifically, I have a div header, which spans the whole screen, then my form object (runat server), then a couple divs, then an asp:Panel. In some cases, the item with the higher z-index is not displaying on top of other controls. I want my login control to display on the header, and have given it a higher z-index but to no effect.