# Stacking order

The order layers are drawn: backgrounds, content, then positioned elements.

## What is the **stacking order**?

The **stacking order** is the order layers are drawn in a stacking context: backgrounds first, then normal content, then positioned elements by `z-index`.

```css
.overlay { position: absolute; z-index: 2; }
.content { position: relative; z-index: 1; }   /* drawn under .overlay */
```

Level: Master · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/master)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/stacking-order
