jargon

Frontend & browser·Layout, CSS and the cascade

you keep raising the number in one file and lowering it in another until the overlay is on top.

z-index

Also calledstacking order

An integer that orders positioned elements within their stacking context, along the axis pointing out of the screen. It only applies to positioned and flex or grid items, and only compares siblings within one context, so it is far less global than it looks. The escalating-number pattern it encourages is why teams end up defining a small named scale and forbidding raw values.

Commonly confused with