Position

Position utilities set the CSS position property. Coordinate properties (top, left, etc.) are not generated -- supply them with custom properties or a scoped style.

Position values

Available classes: position-static, position-relative, position-absolute, position-fixed, and position-sticky.

index.htmlhtml
<div class="position-relative border rounded-sm p-3 mb-3">
  <p>This container is <code>position-relative</code>.</p>
  <p>Absolutely positioned children are anchored to it.</p>
</div>

<p class="bg-surface-raised rounded-sm p-2">A <span class="position-relative bg-surface-raised rounded-sm px-1">relatively positioned inline span</span> stays in flow.</p>

This container is position-relative.

Absolutely positioned children are anchored to it.

A relatively positioned inline span stays in flow.

Reference

ClassPropertyResponsive
.position-staticposition: staticNo
.position-relativeposition: relativeNo
.position-absoluteposition: absoluteNo
.position-fixedposition: fixedNo
.position-stickyposition: stickyNo