Reputation: 43
So I have 3 elements. One is a sticky element with a background. It has an absolute element on it, which has no background. Let's say these are z-index 1 and 3. Now, I have a third element which is absolute with a z-index 2. How can I achieve that the z-index 2 element (with absolute) is above the z-index 1 with sticky, but below the z-index 3 elemnt. Since the z-index 3 element inherits it's z-index from it's parent (which iz z-index 1), it would only be below z-index 2. Is there any way to fix this?
I tried placing z-index 1, 3 into a parent which has a z-index 1 (and is relative), but that didn't work either (z-index 3 still inherited 1)
Upvotes: 0
Views: 118