473,396 Members | 1,892 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,396 software developers and data experts.

z-index not working as expected

I can't get the z-index to work as I understand it. On
<http://snow.prohosting.com/srcopan/anti/> I'm trying to position the
eagle image under the blue box. The image's parent (div navbar) has a
z-index of 1, and the blue box's parent (H1) has a default z-index of 5.
Div navbar and H1 share the same parent, div content. Thus the eagle image
should be below the blue box if I'm understanding correctly, but what
displays is the opposite: the eagle image is over the blue box.

I've tried without success:

* Insuring that the HTML and CSS validate * Explicity setting z-index
values of 5 on H1, div content, and body * Checking the page in different
browsers to see if it is a browser specific issue

Clearly I'm misunderstaning something about how z-index works. But what?

BTW, any other observations about the site are welcome. A lot of content
isn't in place yet but the overall design and structure are shaping up.

TIA,
Warren

Jul 20 '05 #1
2 21216
Warren Post wrote:
Clearly I'm misunderstaning something about how z-index works. But what?


The /z-index/ property only applies to _positioned elements_. That means
you would have to make your 'content' div a positioned element as well,
so that the layered approach would work.

Another possibility in this case would be to make the eagle image a
positioned background and use margins to control the position of the
navigation bar.

Regards,

--
Ney André de Mello Zunino
Jul 20 '05 #2
On Tue, 18 May 2004 14:48:45 -0600, Ney André de Mello Zunino wrote:
The /z-index/ property only applies to _positioned elements_. That means
you would have to make your 'content' div a positioned element as well,
so that the layered approach would work.


Thanks. Not only does that solve the immediate issue, I've learned
something as well.

Warren

Jul 20 '05 #3

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

Similar topics

1
by: JohnDpatriot | last post by:
After installing XP SP2 on my machine, I continually get the Script Error permission denied when I attempt to adjust the Zindex of an object on the page . see below ...
22
by: DJ WIce | last post by:
Hi, I'm looking for a script to get the hi-est z-index on a page. I want my javascript menu to be always on top of the page (moves along on top when you scroll down). Does anyone know how to...
5
by: Razzbar | last post by:
I'm using a div as a floating dialog box. I'd rather use a popup window, but due to all the popup blockers in use, I have to use another method, a div that has absolute positioning. The damn...
1
by: Sabbaath | last post by:
But haven't really found anything that answers the issue. Basically, I have a js function that has these lines in it, among others: var navSectionBg = document.getElementById("mainNav_" +...
26
by: Jenitha S | last post by:
Hi, I am working in JSP code.A Menubar is displayed in JSP page.It's working fine in IE. But in case of firefox the very first menuitem is not working.If i move that menu item as second means it's...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a menu contol on a master page and some dropdown boxes and text boxes on another page that gets loaded into the place holder of the master page. The dropdown menu on the master page...
2
by: zz2uk1 | last post by:
Im trying to show a text box above a div in a simple webpage. Im viewing in IE 7 and Chrome and the text box is always below the div, although I have set the zIndex fairly high. I have included...
1
Claus Mygind
by: Claus Mygind | last post by:
How come I can set this style element document.getElementById("popTime").style.left = "0px"; but not this document.getElementById("freqJobDiv").style.zIndex = "20"; I have two nested...
1
by: bob2044 | last post by:
offsetHeight is not working in following code <script type="text/javascript"> function Coverdiv() { var standard=(document.compatMode=="CSS1Compat") ? document.documentElement:document.body;...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.