This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Robert Huber
Posted Sep 22 - Read on Facebook

I am very new to framer, allow me a simple question:
I am trying to position and size a layer relative to the screen size: I would like the white rectangle to be horizontally centered, but vertically 2/3rds up relating to the screen size. I want the width/height of the rectangle to be 40% of the screen width/height.
Can I do this without referring to exact pixel sizes, as I would like to make a simple prototype for both iPad and iPhone ? thanks for your help.


Kees Plattel

There's a variable that is called Screen.width & Screen.height that you can use in math to calculate exactly where you want it to be positioned. That should get you going!

If you are changing the device dynamically, you'll need to use an event listener that will watch the screen size and update the contents on the fly once it's done resizing.

Robert Huber

thanks, I'll check that out.

Read the entire post on Facebook