Label Alignemt in Perspective

Hi All,

I am working on my first project in Perspective. I have been through IU videos and the user manual and cannot find the answer to this problem.

I have a fan, a Label, and a button in a coordinate container as the main veiw. I have them all centered vertically. The container mode is set to percent.

When the browser window gets smaller, the fan and the button size to adjust, but they also move center.



After narrowing the window:


Now, I know I can use a Flex container and this wont happen but it doesn’t appear I have the control over placement of components like you do in a coordinate container. Also note that I want this to work on mobile devices so a Flex container may be the only way. But I want to learn as much as I can before I switch.

Is there a way to keep all the components referenced on center?

I will appreciate any help I can get.

Thanks, Steven

What is the horizontal alignment of your running text? I suspect it’s set to left and your style and either your label is quite wide, or you have style.overflow ( set to visible?

If you’re wondering why the font size doesn’t change size, you either need to set the font size units to use a screen-relative unit (e.g. vw, or you can also use a perspective style with a media query to size the font differently at different widths.

Edit: reading again, maybe I’m misinterpreting your issue… Actually maybe not. Isn’t it the running text which isn’t behaving correctly, not the other two objects?


The horizontal alignment is set to center.

Font size was not an issue,…but now that you mention it, that might be useful at some point. The idea is to design for a smartphone as this is what will primarily be used.

Well, that may be my question actually. The Label Text is what it is, as, the text size will determine the width. However, the location (x,y) remains fixed.

Well, this is what I found playing with it…


Seems your right. The component containers are staying centered to each other, but the label text does not overflow to the left even though it is set to center. I had not noticed this before.

I plaid with the Style overflow in Style>Misc>Overflow but none of the setting make a difference.

Any ideas?

Thanks for the help!


The Label component won’t centre-align if the width of it is too small, it will always left align once the width can’t support the width of the text. I’d call that a bug, but maybe that’s just how CSS works (@cmallonee or @PGriffith, i always forget which of you guys is more involved in Perspective)

I would increase the width of your Label to suit the smallest width screen. Then it should centre itself at any width screen

1 Like


That is what I thought you would say. I am sure I can make it work but right now I am not able to test on a phone. I have been playing with the same as a flex container and figured out how to space it a bit better. The Flex Container actually works as I would have expected.

Thanks for the help and ideas!!