What is z-index? Z-index is a CSS property that allows you to position HTML elements in layers on top of one another. It seems simple at first, but it’s deceptively simple.There are some weird, non-intuitive rules that can make it not behave the way you want– even if you set z-index to 999999!This article will explain in detail four of the most common reasons that z-index isn’t working for you. You’ll learn how to use CSS to bring elements to the front, or back behind other elements.