# How CSS z-index and stacking order work

DevFeed: [How CSS z-index and stacking order work](<https://devfeed.tech/articles/what-no-one-told-you-about-z-index-29533.md>)

Original publisher: [Read original article](<https://philipwalton.com/articles/what-no-one-told-you-about-z-index/>)

Published: 2013-01-15T19:17:39Z

Content type: tutorial

Language: en

Sources: [Philip Walton](<https://devfeed.tech/sources/philip-walton.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [html](<https://devfeed.tech/tags/html.md>), [z-index](<https://devfeed.tech/tags/z-index.md>)

## AI overview

A tutorial explaining CSS stacking order and why z-index alone does not determine which elements appear in front. It demonstrates how changing a parent element's opacity can affect stacking without changing the HTML, z-index, or position properties.

## Source excerpt

The problem with z-index is that very few people understand how it really works. It's not complicated, but it if you've never taken the time to read its specification, there are almost certainly crucial aspects that you're completely unaware of.