# zIndex

> Controls the stacking order of overlapping elements within a stacking context. The default is auto, which does not create a stacking context; any integer value creates one for the element and its descendants.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
StyleInt zIndex { get; }
```

### Remarks

Unlike CSS, transform and opacity do not establish a stacking context in UI Toolkit; only a z-index other than auto does.
