# X Units

The **X Units** variable controls how a unit is horizontally positioned relative to its parent. By default an object is positioned relative to the left of its parent, where each unit represents 1 pixel.

## Pixels From Left

The following shows a child [ColoredRectangle](/gum/gum-tool/gum-elements/coloredrectangle.md) positioned 50 **Pixels From Left** relative to its parent:

![](/files/Sz3Fx66BuoNhBkpm4Ybb)

## Pixels From Center

The following shows a child ColoredRectangle positioned 50 **Pixels From Center** relative to its parent:

![](/files/ddBN4HXnLXr1zUBTHdWD)

## Pixels From Right

The following shows a child ColoredRectangle positioned 50 **Pixels From Right** relative to its Parent:

![](/files/3ElAXjZbZVSSrg3FVaU2)

## Percentage Parent Width

The following shows a child ColoredRectangle positioned 50 **Percentage Parent Width** relative to its Parent. In other words, it will be positioned halfway between the left and right edges of the Parent:

![](/files/31R1624smrvvAha6zRtJ)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/gum/gum-tool/gum-elements/general-properties/x-units.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
