Every element exposes its live measurements, so one element can position or size itself relative to another. You read them as element.property, using the element's name and a dot.
The measurements you can read:
width,height: the element's size.left,right,top,bottom: the position of each edge.x,y: the element's position.
For example, set a caption's Y position to headline.bottom + 20 and the caption always sits 20 pixels below the headline, however long the headline grows. Change the headline and the caption follows automatically.
These measurements update live as content changes, which is what makes layouts that react to dynamic text possible. A collection also exposes .length, the number of items it currently holds.