Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post

    Z-Indexing: Is there a way that works?

    On several occasions I've wanted to have different divs appear behind/infront of one another. I have always thought that it's a simple case of adding the Z-Index values with 0 being the one at the back and x being the one in the foreground.

    However, even if I try this, it doesn't work. I've tried it in IE and FF.

    Is this the way to do it? Is it supported by all the browsers, or just IE?

    If this isn't the way to do, how do you do it?

    I'm currently having to create a single image to span my page with a transparent section where I want the other layers to appear.

    Many thanks in advance,
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For z-index to work the element also needs to have the position set, usually to relative or absolute depending on your layout.
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post
    That's great! Cheers I never knew that the position needed to be set.

    Thanks alot
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •