z-index is calculated relative from the first parent that has a non static position (absolute, relative, fixed)
따라서 z-index가 원하는대로 적용되지 않을때는 그들의 부모 요소의 position을 확인할 필요가 있다. (보통은 position: relative를 추가하면 해결할 수 있는 경우가 많다)
출처:
https://stackoverflow.com/questions/13217199/elements-with-higher-z-index-are-still-positioned-below-elements-with-lower-z-in