Skip to main content
CSS-Tricks
Since 2007
  • Articles
  • Guides
  • Almanac
  • Links
  • Picks
  • Newsletter
  • Search

Articles Tagged
stacking contexts

5 Articles
{
,

}
Screenshot of a code editor with a large number of z-index values, many of which include the !important keyword.
Direct link to the article The Value of z-index
css properties stacking contexts

The Value of z-index

How we look at the stacking order of our projects, how we choose z-index values, and more importantly, the implications of those choices.
Image
Amit Sheen on Mar 9, 2026
Image
Direct link to the article In Praise of Shadows
background-image centering grid object-fit scroll-snap stacking contexts

In Praise of Shadows

Our dear friend Robin has a new essay called In Praise of Shadows. Now, before you hop over there looking for nuggets on CSS box shadows, text shadows, and shadow filters… this is not that. It’s an essay …

Image
Geoff Graham on Jul 12, 2022
Image
Direct link to the article It’s always the stacking context.
stacking contexts z-index

It’s always the stacking context.

In “What the heck, z-index??,” Josh Comeau makes the analogy of layer groups in design software like Photoshop or Figma to stacking contexts in CSS. If you’ve got an element in a layer group A in Photoshop that …

Image
Chris Coyier on Mar 22, 2021
Image
Direct link to the article CSS Painting Order
stacking contexts z-index

CSS Painting Order

Usually, when I see terms like “painting order” or “stacking context” my brain will start to shut off and my eyes will gloss over. Not that my brain doesn’t normally shut off more often than not, but that’s another topic …

Image
Geoff Graham on Jul 17, 2020
Image
Direct link to the article Putting things on top of other things
stacking contexts z-index

Putting things on top of other things

A plain-language romp through the trials and tribulations of z-indexby Isabel Brison. On the surface, z-index seems simple. It’s a number and it represents what is on top of what… assuming it is positioned… and assuming it is within …

Image
Chris Coyier on Sep 25, 2018

CSS-Tricks is powered by DigitalOcean.

Get Curated Front-End Roundups Right in Your Inbox

Coming back really, really soon! See past issues →

CSS-Tricks
  • About the site
  • Contact us
  • Write for CSS-Tricks!
  • Advertising
  • RSS Feeds
Social
  • Bluesky
  • Mastodon
  • CodePen
  • X / Twitter
  • LinkedIn
Legalese
  • CSS-Tricks License
  • AI Statement
Back to Top
Advertisement
Advertisement