View Full Version : Positioning a div behind a relative positioned div

11-13-2011, 07:57 AM
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!!

11-13-2011, 09:45 AM
You just need to change z-index to -1.

11-13-2011, 09:59 PM
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.

11-13-2011, 10:40 PM
#pickingNose {
position: fixed;

#pickingNose img {
position: relative;
z-index: 1000;

Cross Browser CSS transform (http://www.useragentman.com/blog/2010/03/09/cross-browser-css-transforms-even-in-ie/)

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.