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

What is Framer? Join the Community
Return to index
Édouard Urcades
Posted Aug 13 - Read on Facebook

Is there a simple way to center literally everything in the browser preview? I'm wanting to mask & center this guy right here

http://publicservices.co/Framer/Bee.framer/index.html

3 Comments

Alex Hazel

You need the container to be position absolute with left 50%.
Then the content inside of it needs to be position relative and left -50%

The container in the project is the div with the ID "FramerRoot"
Then all the new layers inside that container need to have position relative and left -50%

<div style="position: absolute; left: 50%;">
<div style="position: relative; left: -50%;">
I am some centered content
</div>
</div>

Alex Hazel

You might have to edit the index.html file once you save your changes inside Framer Studio if you can't target the container with CSS from within Studio....

Koen Bok

Something like:

mainLayer.center()
mainLayer.clip = true

Read the entire post on Facebook