Z-Index not working on pseudo-elements?

cm

http://jsfiddle.net/Kq2PY/

div is relative with z-index 5 and: after the thing is absolute with z-index 2.

So it doesn't follow: after the div is behind?

+7
source share
1 answer

You will need to give the pseudo-elements a negative z-index to force it to be the parent behind it, plus remove the z-index for the parent. http://jsfiddle.net/jklm313/Kq2PY/4/

+18
source

All Articles