As you can see in the image I have the following structure:
#container {
  background-color: yellow;
  position: relative;
}
#child1 {
  background-color: greenyellow;
  position: absolute;
  top: 0;
}
#child1a {
  background-color: green;
  z-index: 40;
}
#child2 {
  position: absolute;
  z-index: 1;
  background-color: violet;
}<div id="container">
  <div id="child1">
    <div id="child1a" />
  </div>
  <div id="child2" />
</div>As I understand, child1 should not create a new stacking context since I do not specify z-index. Therefore the parent stacking context of child1a should be same as the parent context for child2 and since the z-index of child1a is bigger than that of child2 is should be above child2, what am I missing here?
 
    