Test zIndex

test1
        background: #ff0000;
        z-index: 10;
        height: 10em;
        width: 20em;
        position: relative;
    
This box overlaps the blue box, even though this box has z-index:11; and the blue box has z-index: 20;

Conclusion

If an element is put inside an absolute/relative positioned element, the z-index stacks ontop of the parent element.