The layout system can use relative coordinates as well as absolute. Pixels are absolute. Changing the anchor to "custom" will let you specify a 0-1 range relative value. Horizontally 0 means "left", and 1 means "right", while 0.5 is "center". Check the UIRect's documentation page for details.
Since the UIRoot is Fixed Size, your UI is in virtual pixels and you need to convert screen pixels to virtual pixels by taking UIRoot's pixelSizeAdjustment into consideration.