473,585 Members | 2,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tough z-index questions

Hello fellow colleagues,

Can someone explain to me why, in this page
http://www.aplus.co.yu/css/z-pos/index4.php#content ,
AP1 should not be in front of (overlapping) AP2 ?

Recap:
RP1 is relatively positioned block, with z-index:11

AP1 is an absolutely positioned block, with z-index:10, nested inside RP1

RP2 is relatively positioned block, with z-index: auto

AP2 is an absolutely positioned block, with z-index:20, nested inside RP2

-------

In the second example where
RP1 has z-index: 11
AP1 has z-index: 1000
RP2 has z-index: auto
AP2 has z-index: 20
I do not see/understand why AP1 shouldn't be in front of AP2.

Gérard
--
remove blah to email me
Nov 23 '05 #1
5 3178
Gérard Talbot wrote:
Hello fellow colleagues,

Can someone explain to me why, in this page
http://www.aplus.co.yu/css/z-pos/index4.php#content ,
AP1 should not be in front of (overlapping) AP2 ?

Recap:
RP1 is relatively positioned block, with z-index:11

AP1 is an absolutely positioned block, with z-index:10, nested inside RP1

RP2 is relatively positioned block, with z-index: auto

AP2 is an absolutely positioned block, with z-index:20, nested inside RP2

-------

In the second example where
RP1 has z-index: 11
AP1 has z-index: 1000
RP2 has z-index: auto
AP2 has z-index: 20
I do not see/understand why AP1 shouldn't be in front of AP2.


Because they're in a different "stacking context" - in a different
sub-stacking order.

http://www.w3.org/TR/CSS21/visuren.html#x36

--
Gus
Nov 23 '05 #2
Gus Richter a écrit :
Gérard Talbot wrote:
Hello fellow colleagues,

Can someone explain to me why, in this page
http://www.aplus.co.yu/css/z-pos/index4.php#content ,
AP1 should not be in front of (overlapping) AP2 ?

Recap:
RP1 is relatively positioned block, with z-index:11

AP1 is an absolutely positioned block, with z-index:10, nested inside RP1

RP2 is relatively positioned block, with z-index: auto

AP2 is an absolutely positioned block, with z-index:20, nested inside RP2

-------

In the second example where
RP1 has z-index: 11
AP1 has z-index: 1000
RP2 has z-index: auto
AP2 has z-index: 20
I do not see/understand why AP1 shouldn't be in front of AP2.

Because they're in a different "stacking context" - in a different
sub-stacking order.

http://www.w3.org/TR/CSS21/visuren.html#x36


I still don't get it. RP1 has a greater stack level than RP2. So it
should be in front of RP2. 11 is greater than 0.

"Boxes with greater stack levels are always formatted in front of boxes
with lower stack levels."

Now, the sub-stack level shouldn't change that. 11.10 is still greater
than 0.20.
"For those with 'z-index: auto', treat the element as if it created a
new stacking context, but any descendants which actually create a new
stacking context should be considered part of the parent stacking
context, not this new one."
http://www.w3.org/TR/CSS21/zindex.html#q2

Gérard
--
remove blah to email me
Nov 23 '05 #3
Gérard Talbot wrote:
Gus Richter a écrit :
Gérard Talbot wrote:
Can someone explain to me why, in this page
http://www.aplus.co.yu/css/z-pos/index4.php#content ,
AP1 should not be in front of (overlapping) AP2 ?

I do not see/understand why AP1 shouldn't be in front of AP2.


Because they're in a different "stacking context" - in a different
sub-stacking order.

http://www.w3.org/TR/CSS21/visuren.html#x36


I still don't get it.

RP2 current stacking context=10 local stacking context=0
AP2 local stacking context=10
RP1 current stacking context=11 local stacking context=0
AP1 local stacking context=1000

--
Gus
Nov 23 '05 #4
Gérard Talbot wrote:
Gus Richter a écrit :
Gérard Talbot wrote:
Hello fellow colleagues,

Can someone explain to me why, in this page
http://www.aplus.co.yu/css/z-pos/index4.php#content ,
AP1 should not be in front of (overlapping) AP2 ?

Recap:
RP1 is relatively positioned block, with z-index:11

AP1 is an absolutely positioned block, with z-index:10, nested inside
RP1

RP2 is relatively positioned block, with z-index: auto

AP2 is an absolutely positioned block, with z-index:20, nested inside
RP2

-------

In the second example where
RP1 has z-index: 11
AP1 has z-index: 1000
RP2 has z-index: auto
AP2 has z-index: 20
I do not see/understand why AP1 shouldn't be in front of AP2.


Because they're in a different "stacking context" - in a different
sub-stacking order.

http://www.w3.org/TR/CSS21/visuren.html#x36

I still don't get it. RP1 has a greater stack level than RP2. So it
should be in front of RP2. 11 is greater than 0.

"Boxes with greater stack levels are always formatted in front of boxes
with lower stack levels."

Now, the sub-stack level shouldn't change that. 11.10 is still greater
than 0.20.
"For those with 'z-index: auto', treat the element as if it created a
new stacking context, but any descendants which actually create a new
stacking context should be considered part of the parent stacking
context, not this new one."
http://www.w3.org/TR/CSS21/zindex.html#q2


Sorry, I mixed up the 1st and 2nd example in my deleted initial
response. Here is the way I see it in order of bottom to top, or back to
front for the first example:

RP2 z-index:auto or zero (does not establish a new local stacking
context.)
RP1 z-index:11 (current stacking context) z-index:0 (local stacking
context)
AP1 z-index:11 (local stacking
context)
AP2 z-index:20 (current stacking context)

--
Gus

Nov 23 '05 #5
Gérard Talbot wrote:
Gus Richter a écrit :
Gérard Talbot wrote:
Hello fellow colleagues,

Can someone explain to me why, in this page
http://www.aplus.co.yu/css/z-pos/index4.php#content ,
AP1 should not be in front of (overlapping) AP2 ?

Recap:
RP1 is relatively positioned block, with z-index:11

AP1 is an absolutely positioned block, with z-index:10, nested inside
RP1

RP2 is relatively positioned block, with z-index: auto

AP2 is an absolutely positioned block, with z-index:20, nested inside
RP2

-------

In the second example where
RP1 has z-index: 11
AP1 has z-index: 1000
RP2 has z-index: auto
AP2 has z-index: 20
I do not see/understand why AP1 shouldn't be in front of AP2.


Because they're in a different "stacking context" - in a different
sub-stacking order.

http://www.w3.org/TR/CSS21/visuren.html#x36

I still don't get it. RP1 has a greater stack level than RP2. So it
should be in front of RP2. 11 is greater than 0.

"Boxes with greater stack levels are always formatted in front of boxes
with lower stack levels."

Now, the sub-stack level shouldn't change that. 11.10 is still greater
than 0.20.
"For those with 'z-index: auto', treat the element as if it created a
new stacking context, but any descendants which actually create a new
stacking context should be considered part of the parent stacking
context, not this new one."
http://www.w3.org/TR/CSS21/zindex.html#q2


I hope that I'm going to get it right this time!
Sorry, I mixed up the 1st and 2nd example in my deleted initial
response. Here is the way I see it in order of bottom to top, or back to
front for the first example:

RP2 z-index:auto or zero (does not establish a new local stacking
context.)
RP1 z-index:11 (current stacking context) z-index:0 (local stacking
context)
AP1 z-index:10 (local stacking
context)
AP2 z-index:20 (current stacking context)

--
Gus
Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1535
by: Christine Long | last post by:
Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project. Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs 0vHQf2M7VXa
0
1422
by: Aaron Williams | last post by:
Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project. Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs s5GK6MpJPxAn2ip
4
2265
by: leegold2 | last post by:
Let's I do a mysql query and then I do a, for( $i = 1; $row = mysql_fetch_array($result); $i++ ) {...} and it gives me this: PageID Title URL Description 1 lee's gogle1.com This is lee's website. 1 lee's gogle2.com This is lee's website. 2 Jon's yaho1.com This is Jon's...
3
1397
by: frank.baris | last post by:
I usually can figure out anything by searching the groups or the net all day, but this problem has been bugging me for awhile now. I have multiple databases, all of which have the same 2 tables, and all the same fields and field types. Each database holds a particular vendors data, lets call them VDB1, VDB2, ... VDBX. Then I have a temp...
9
2123
by: Google Mike | last post by:
I guess I'm confused by the whole timezone thing and I don't want to write a web app that gets this stuff wrong. I don't know how timezones work exactly -- is it just hours +/- on GMT or are there going to be minor differences on minutes and seconds too? What I want to do is have a web app that one logs into (great place for submitting the...
3
1615
by: eric rudolph | last post by:
1. I'm designing a PHP-based page that has a lot of design stuff in it. It's very tough to mix the HTML and PHP and have it be readable. The site isn't overall so complicated, there's just a lot of graphics. Is there some commercial way to design the page in a design program, then to use the designed page as a skeleton, or "template" or "fill...
5
1964
by: Abyss | last post by:
My view. anyone that doesn't like it tough, click off and stop reading it. I have spent the last 45 minutes reading through all the posts, and I believe that you have all missed the mark of that post. The post was not about strict or transitional pages, it wasn't even about
28
3907
by: Arial | last post by:
My SQL string is kind of wierd one. In my application, I need to select things from an unknown name table. But I know the table name before the SQL command is executed. For instance, Dim varname as string = 'one of my variable. It's part of the table name. Dim t1 as String = varname+ "0000"
12
1469
by: Mr Shore | last post by:
how to do the follows in IE: there's page A with element a pop a new page B from script in A and append element a into B after closing page B put element a back into A 'IE' solution only
4
1947
by: Jim Rutledge | last post by:
ok ok , anyone know anything on this tough question? How do you determine the length in seconds that a midi file is , or any audio file for that matter ?
0
7835
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8195
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7947
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8209
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5707
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5386
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3831
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2340
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.