Here is the fiddle: http://jsfiddle.net/6Lk4s/
<div class="box">
<div class="c1"></div>
<div class="c2"></div>
</div>
I try to display .c1 and .c2 behind .box (so box has a higher z-index and all three classes have position:relative set), but I can’t get it to show up this way.
What is my error?
.c1and.c2are part of.box(as they are child element of it) if you want them to be behind it they have to be separated elementsAlso to position behind
.boxthe easiest way is to position absolute them see: http://jsfiddle.net/6Lk4s/1/For more documentation on how z-index works see the w3c spec thanks to @Joseph Silber: http://www.w3.org/TR/CSS2/zindex.html#painting-order