473,581 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

relatively positioned elements and overlaping

Hi,

The W3C says:
"The 'z-index' property is used to specify the stacking order of
positionable elements <#Positionable_ Elements>."
and it defines positionable elements as "Elements whose 'position'
property is set to either 'absolute' or 'relative'."
<#Positionable_ Elements>
Then the z-index style should work for a relative positioned SPAN for
instance, right?

Microsoft also says:
"It is quite possible that relatively positioned elements will overlap
with other objects and elements on the page. As with absolute
positioning, you can use the z-index attribute to set the *z-index* of
the positioned element relative to other elements that might occupy the
same area."

Then, in the following code, the content of the SPAN which has a z-index
of 1 should not overlap the rest of the paragraph with a x-index of 2.
What's the problem?

<P STYLE="position :relative; z-index:2; background-color: Aqua;">This
text should not be<SPAN STYLE="position : relative; z-index:1;
left:-50px; background-color: #ECE9D8;">overl aped</SPAN></P>.

<#Positionable_ Elements>

--
_______________ _______________ _________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/cus...s/tagstore.cfm
(Please send any spam to this address: pi*******@inter netique.com)
Thanks.
Jul 21 '05 #1
3 1929
It would help, if you could send an URL with example. In this example
the span should overlap the p regardless of z-index.

Chris

Jul 21 '05 #2
>>In this example the span should overlap the p regardless of z-index.

But why? Both the P and the SPAN have their position set to relative, so they are
"positioned objects", so the z-index should apply.

Because the SPAN is embeded insite the P?
I cannot see this anywhere in the specs.
Jul 21 '05 #3
Claude Schneegans wrote:
In this example the span should overlap the p regardless of z-index.

But why? Both the P and the SPAN have their position set to relative, so
they are "positioned objects", so the z-index should apply.

Because the SPAN is embeded insite the P?
I cannot see this anywhere in the specs.


Claude,
If you're going to ask the question on several forums, then check each
for responses. Your question was answered yesterday at n.p.d.css .
Alexander also gave you a clue in your previous List question here.

--
Gus
Jul 21 '05 #4

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

Similar topics

4
2648
by: Christopher | last post by:
This should be a quick one. URL: http://cfa-www.harvard.edu/~cpilman/Stuff/flush.html Code: ============================= <!DOCTYPE HTML Public "-//W3C//DTD HTML 4.01//EN"> <HTML><Head><Title>Get my feet off the ground</Title> <Meta HTTP-Equiv="Content-Type" Content="text/html; charset=us-ascii"> <Style type="text/css"> Body { font-size:...
3
6934
by: David Winter | last post by:
This is probably trivial, but I simply don't get it. I have a "position:absolute" type DIV with another one in it. I want the outer DIV to encompass the inner one. I.e., when the inner DIV contains text and images, the outer DIV should grow (vertically), so that its background color and frame encompasses the inner DIV and all its content. ...
7
4715
by: Jonas Smithson | last post by:
Hello all, I have an absolute positioned parent div, and nested inside it is an absolute positioned child div -- I mean the div *code* is nested inside, but the child is physically positioned so that it's completely outside the parent div (to the left of its parent, in a left-side margin area). The child div contains hyperlinks. Explorer...
12
6279
by: deko | last post by:
Is there any way to work around the blank space created by hidden divs? I'm trying to use a relatively postioned divs with show/hide behaviors to annotate an image. The divs show/hide onMouseOver/onMouseOut but leave a blank space on the page when hidden (the space where the divs would normally be). Is it possible to use z-indexing to put...
4
16138
by: Philipp Lenssen | last post by:
Is it possible in IE6+NS7 to center-align a div of fixed width which itself contains elements which use "position: absolute"? Using "margin-left: auto" and "margin-right: auto" works well to center something, but the absolute-positioned contents of the outside layer will be stuck to the left of the window...! Thanks a lot! -- Google...
6
11978
by: Claude Schneegans | last post by:
Hi, In the code below, the lists elements at level 1 have a z-index of 1 and those at level 2 have it set to 2. Normaly, since level 1 and 2 overlap, level 2 elements should be seen above those at level 1; at least, this is what I'm trying to get. However, one can see ( http://www.contentbox.com/claude/test/zIndex.htm ) that the...
5
3988
by: felipevaldez | last post by:
how can I put an element below another element, that's not absolutely positioned? so I have a n element, called X, and next to that, an element Y X Y XXXXXX
2
4331
by: Rombolt | last post by:
Hi I have a MSSQL table with many time intervals stored as datetime. Each time interval is also assigned a numeric type that specifies what type of job was done during the time interval. I need to add-up the time intervals by type, make sure overlaping portions of intervals are not accounted for twice and also respect interval type priorities....
0
7868
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7792
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
8175
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
5674
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
5364
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
3827
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2301
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
1
1403
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1138
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.