Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:37 PM
Warren Post
Guest
 
Posts: n/a
Default 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

  #2  
Old July 20th, 2005, 11:38 PM
Ney André de Mello Zunino
Guest
 
Posts: n/a
Default Re: z-index not working as expected

Warren Post wrote:
[color=blue]
> Clearly I'm misunderstaning something about how z-index works. But what?[/color]

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
  #3  
Old July 20th, 2005, 11:39 PM
Warren Post
Guest
 
Posts: n/a
Default Re: z-index not working as expected - SOLVED

On Tue, 18 May 2004 14:48:45 -0600, Ney André de Mello Zunino wrote:
[color=blue]
> 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.[/color]

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

Warren

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles