Skip to content
NativeScript Unified

NativeScript views

AbsoluteLayout

<AbsoluteLayout> positions every child with left and top. The layout is position: relative and each child is position: absolute.

AttributeOnMeaning
leftchildOffset from the left edge. A bare number is pixels. Default 0.
topchildOffset from the top edge. Default 0.

The container has no intrinsic height because all children are out of flow, so give it one.

10, 10
120, 50
40, 100

HTML-first equivalent

The polyfill sets the container to position: relative and each child to position: absolute. That is relative on the container and absolute plus left-* and top-* on the children:

10, 10
120, 50
40, 100