Label style.verticalAlign

I cannot set a label(common) style.verticalAlign during runtime,

this is my syntax
label1.style.verticalAlign=“center”

How to make is work

Thanks

Centering in CSS is exasperating - there have been many cartoons over the years.

If you’re using a common Label, it’s easy: there is a verticalAlign property you can set.

Here’s a more general document which discusses centering: