Position
Controls the positioning of elements.
Class | Properties |
---|---|
p-a | position: absolute; |
p-f | position: fixed; |
p-r | position: relative; |
p-s | position: static; |
p-st | position: sticky; |
Absolute
This example sets the position to absolute. The element is positioned relative to its nearest positioned ancestor (not static), allowing for precise placement.
We are currently working on this example.
<p class="fw-600 ta-c">We are currently working on this example.</p>
Fixed
This example sets the position to fixed. The element is positioned relative to the viewport, meaning it stays in the same place even when the page is scrolled.
We are currently working on this example.
<p class="fw-600 ta-c">We are currently working on this example.</p>
Relative
This example sets the position to relative. The element is positioned relative to its normal position, allowing for adjustments without affecting the layout of surrounding elements.
We are currently working on this example.
<p class="fw-600 ta-c">We are currently working on this example.</p>
Static
This example sets the position to static. The element is positioned according to the normal flow of the document, and top, right, bottom, and left properties have no effect.
We are currently working on this example.
<p class="fw-600 ta-c">We are currently working on this example.</p>
Sticky
This example sets the position to sticky. The element is treated as relative until it crosses a specified threshold, at which point it is treated as fixed.
We are currently working on this example.
<p class="fw-600 ta-c">We are currently working on this example.</p>
Utilizing utilities conditionally
Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.
Responsive breakpoints
You can combine responsive breakpoints like sm:p-*
,md:p-*
, lg:p-*
, and xxl:p-*
allows targeting specific utilities in
different viewports.
<div class="p-a md:p-s ..."></div>
Utilizing utilities conditionally
Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.
Hover states
Alternatively, you can apply :hover
by using h:p-*
utility to override elements
and change their values when hovering over them.
<div class="p-a h:p-s ..."></div>