I have the following code where I'm trying to display div
with class="one"
above all it's child div
s (so the whole element appears red). But that does not seem to be happening. How do I fix this?
https://jsfiddle.net/nordy/15heL6gf/
<div class="one">
<div class="two">This is two</div>
<div class="two">This is two
<div class="three">This is three</div>
</div>
</div>
CSS
.one {
border:1px solid black;
background:red;
position:relative;
z-index:5
}
.two {
background:green;
position:relative;
}
.three {
position:relative;
}