ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Position text box relative to bottom of previous text box

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alifeleti Brown
Position text box relative to bottom of previous text box
on Feb 10, 2020 at 11:59:35 pm
Last Edited By Alifeleti Brown on Feb 12, 2020 at 12:53:56 am

I need to position a text layer (inside an auto-scaling shape box) relative to the text layer above it.

My goal is to produce an essential graphics file with dynamic text boxes vertically positioned.



Paragraph starts here, relative to heading above.

Second paragraph starts here, relative to paragraph above.

I've managed to sort of get this working through parenting and anchor offset.

However when I type into the the child element (say the first or second paragraph above), the alignment offset begins to 'creep'. I think this is because the auto-scaling text box effect relies on the anchors being centred.

I've trawled the forums and tried a heap of expressions to do this but can't seem to work it out!


I worked it out! This places the following element at 50px below the Text1 layer.

a = thisComp.layer("Text1").transform.position[0];
b = thisComp.layer("Text1").transform.position[1];
c = thisComp.layer("Text1").sourceRectAtTime();

Top =;
Width = c.width;
Left= c.left;
Height = c.height;



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved