I have two elements in the same container, the first has position: absolute
, the second position: relative
. Is there a way to set the "z-index" of an absolute element so that its in the background? The relative positioned element should be on the top (z-layer) because it holds links...
Here is a JSFiddle: http://jsfiddle.net/8eLJz/
The absolute positioned element is on the top of the z-layer and I have no influence with the z-index
-property. What can I do?
I'm not sure which one you want in front, but you just need to set position on both and set z-index on both. http://jsfiddle.net/8eLJz/2/
CSS has a z-index property so on your
nav#mainNav > img
selector just setz-index: -1;
. Here is a working jsFiddle: http://jsfiddle.net/8eLJz/1/http://jsfiddle.net/8eLJz/3/