How can I center the text?

Godot Version

4.3

Question

How can I center the “Name” RichTextLabel so it is in the center vertically?

I am not sure but as I know, you can’t change the alignment vertically in RichTextLabel. Maybe try any tricky way? Like you could decrease the “Name” label size in y, and set VBoxContainer alignment to center.

Maybe consider:

1 Like

One way is to enable fit content so the richtextlabel will always be the exact size of the text when it’s inside a container, and then using vertical container size flags set to shrink center and expand

1 Like