Why z-index property isn't working with element with position absolute, if this element has parent that has position fixed? I make simple example for this case
HTML:
<div id='q1'>
<div id='q2'></div>
</div>
CSS:
#q1 {
position: fixed;
width: 100%;
height: 50px;
background-color: red;
z-index: 0;
}
#q2 {
position: absolute;
top: 80%;
border: 2px solid black;
width: 100px;
height: 30px;
background-color: green;
z-index: -1;
}