CSS z-index: Why Is It Not Working? Stacking Contexts Explained
A tooltip with z-index: 999999 can still appear behind a header. A dropdown can also be clipped even when its stacking order is correct. These are distinct problems. The examples below show how to diagnose paint order, containing blocks and clipping instead of escalating arbitrary numbers.