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
    Mr.
    Mr. is offline
    Regular Coder
    Join Date
    Feb 2011
    Posts
    112
    Thanks
    8
    Thanked 4 Times in 4 Posts

    Positioning a div behind a relative positioned div

    I am pretty good with CSS but right now I am stumped... I hope someone out then better than myself can figure this out.

    How do I put an Absolute positioned Div behind the relative positioned div?

    If you go to my site...

    www.ImASpy.com you will see what i am trying to do... I want that guy picking his nose behind all the site content where I will use jQuery to make him reveal when his forehead is clicked on.


    The code is massive so I'm not gonna post it here unless you need it. Thanks to the answer!!

  • #2
    Regular Coder
    Join Date
    May 2010
    Location
    Bathurst, Australia
    Posts
    180
    Thanks
    1
    Thanked 22 Times in 22 Posts
    You just need to change z-index to -1.
    Disclaimer: I'm hungover 70% of the time i'm on here, any information given may not be correct, or even legible.

  • #3
    Mr.
    Mr. is offline
    Regular Coder
    Join Date
    Feb 2011
    Posts
    112
    Thanks
    8
    Thanked 4 Times in 4 Posts
    No, that is not true. If you read what I needed done you would not have said that. Please only post if you know what you're talking about. Now I'm really not gonna get answer on this.

  • #4
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    Code:
    #pickingNose {
      position: fixed;
    }
    Code:
    #pickingNose img {
      position: relative;
      z-index: 1000;
    }
    Cross Browser CSS transform

    EDIT: It's already behind? Relative is ahead of fixed. In that case, the code above will make the img on top of the the content.
    Last edited by Sammy12; 11-13-2011 at 10:48 PM.


  •  

    Posting Permissions

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