Inset

Position an element relative to its edges.

The inset property (historically top, right, bottom, left) defines the offsets for positioned elements. Its behavior depends on the position property.

Properties

inset is a helper property in Taffy (and CSS shorthand) that sets:

PropertyDescription
topDistance from the top edge.
bottomDistance from the bottom edge.
leftDistance from the left edge.
rightDistance from the right edge.

Behavior

  • For Position.Absolute: Offsets are relative to the nearest positioned ancestor.
  • For Position.Relative: Offsets move the item relative to its normal position in the flow.

Example

Loading Preview…

Next Steps

© 2026 ByteLand Technology Limited