Skip to content

Positioning Elements

Position

Direct properties for specifying the positioning of an element:

PropertyDescription
relativerelative to its normal position.
absoluterelative to its nearest positioned ancestor.
fixedrelative to the viewport.
stickyrelative to the viewport, but only when it is within the viewport.
staticaccording to the normal flow of the document.
initialSets the property to its default value.
inheritInherit the position from the parent element.

Direction

Compound properties for specifying the final horizontal or vertical position of an element:

PropertyExpected ValuesExample
leftSpacingToken (e.g., d3)left:d4
rightSpacingToken (e.g., d3)right:d4
topSpacingToken (e.g., d3)top:d4
bottomSpacingToken (e.g., d3)bottom:d4

Z-Index

Compound property for specifying the z-index of an element:

PropertyExpected ValuesExample
zNumericToken (e.g., 30)z:30

Empty Content

Pseudo-elements require a declared content value in order to be rendered if empty. As such, Elevate provides a direct property to do so:

PropertyDescription
emptyequivalent to content: ""