473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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;">overlaped</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*******@internetique.com)
Thanks.
Jul 21 '05 #1
3 1921
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
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">...
3
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...
7
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...
12
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...
4
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...
6
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...
5
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.