Position
Positioning, inset, and float utilities - all with responsive variants.
Position values
Set the CSS position property on any element. Both shorthand and .pos-{value} forms are generated.
<div class="relative">
<div class="absolute">Positioned inside relative parent</div>
</div>
<nav class="fixed">Fixed nav</nav>
<header class="sticky">Sticky header</header>
| Class | Alias | CSS |
|---|---|---|
.static | .pos-static | position: static |
.relative | .pos-relative | position: relative |
.absolute | .pos-absolute | position: absolute |
.fixed | .pos-fixed | position: fixed |
.sticky | .pos-sticky | position: sticky |
Offset (top / right / bottom / left)
Inset utilities on the spacing scale, matching padding, margin, and gap. Values are rem-based; every class also accepts responsive prefixes such as md:top-6.
Preview
<!-- Pin every side -->
<div class="absolute inset-0">Overlay</div>
<!-- Offset a single side -->
<span class="absolute top-15 right-15">12px from the top-right</span>
<!-- Responsive offset -->
<div class="fixed top-3 md:top-6">Floating button</div>
| Class | Value |
|---|---|
.top-0 | 0 |
.top-05 | 0.25rem (4px) |
.top-1 | 0.5rem (8px) |
.top-15 | 0.75rem (12px) |
.top-2 | 1rem (16px) |
.top-3 | 1.5rem (24px) |
.top-4 | 2rem (32px) |
.top-5 | 2.5rem (40px) |
.top-6 | 3rem (48px) |
Swap top for right, bottom, or left to offset any single side, and use .inset-{n} to set all four at once. All classes accept responsive prefixes such as md:top-6.
Zero inset shorthands
These classes set the named sides to 0 - useful for pinning an overlay to a corner or edge without writing all four coordinates.
| Class | Sets to 0 |
|---|---|
.top | top: 0 |
.left | left: 0 |
.bottom | bottom: 0 |
.right | right: 0 |
.top-left | top: 0; left: 0 |
.top-right | top: 0; right: 0 |
.bottom-left | bottom: 0; left: 0 |
.bottom-right | bottom: 0; right: 0 |
Float
Float utilities and clearfix for legacy float-based layouts.
<div class="clearfix">
<img class="float-left" src="..." alt="...">
<p>Text wraps around the floated image.</p>
</div>
| Class | CSS |
|---|---|
.float-left | float: left |
.float-right | float: right |
.clearfix | clear: both |
Responsive variants. All position values support breakpoint prefixes - e.g.md:absolute,lg:sticky. Inset utilities also support responsive prefixes viabreakpoint-from.