Z-index Below Text But Above Background
I'm trying to get a div to show as a partial background below the inline content of is containing div but above the background of its container. If I set the z-index of just the pa
Solution 1:
The reason this is occurring, is because there is a child and a parent. If you set a z-index
on the parent, the child is going to be the same, since the z-index
is stacked.
Thus, by setting a z-index
of 1
on the parent, the child is now also 1
.
It is systematically impossible for the child to be behind the parent, as that doesn't make any sense. However, the text is a sibling of the child. By setting a z-index
of -1
on the child, there is essentially no effect between the child and the parent, however since the sibling is effected, the child now goes behind the sibling.
Post a Comment for "Z-index Below Text But Above Background"