467,910 Members | 1,699 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

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
  • viewed: 21063
Share:
2 Replies
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by DJ WIce | last post: by
5 posts views Thread by Razzbar | last post: by
2 posts views Thread by =?Utf-8?B?UGF1bA==?= | last post: by
2 posts views Thread by zz2uk1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.