Offset

Available as: Web ComponentShortcodeOxygen Element

The component offsets itself to the height of a specified element. It comes in handy when dealing with a fixed header and is used on this site. Simply wrap your main content container with it and select a target element. The distance will adjust on screen resize.

Properties

display

Type: stringDefault: 'block'CSS variable: --spx-offset-display

Component display property.

target

Type: stringDefault: 'header'

Target element.

Events

spxOffsetDidLoad

Fires after component has loaded.

Methods

recalc

Recalculate distance.

reload

Reload component.