On this page
  1. inset
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

inset

Prev: `position` | Up: positioning | Next: `z-index`
Rel: positioning, Positioning & Stacking Guide
Ref: MDN Web Docs — inset
Tags: #public #web #css #properties #positioning #tier/core


Syntax & Overview

inset: 0;  /* shorthand for top right bottom left */

Logical/physical offset shorthand for positioned elements.

Notes & Best Practices

Example

.overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
}

Linked from

Related notes