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

What is Framer? Join the Community
Return to index
Roland Lösslein
Posted Sep 08 - Read on Facebook

Hey framers,
is there any best practice to set the width of a layer to the width of its HTML content? Help is appreciated!

1 Comments

Roland Lösslein

Got it! For the ones stumble upon this, here's a possible solution: layerA.width = layerA.querySelectorAll(".child-class")[0].offsetWidth

Read the entire post on Facebook