Auto margin
Learn how to use auto margin to quickly center a container element.
We’re transitioning to a new UI, and are in the process of updating our Webflow University content.
Auto margin is used by Apple, Google, Stripe, and other design leaders as a way to horizontally center elements. By setting auto margin to an element that has a defined width, you can horizontally center the element within the boundary of its parent.
To select and apply auto margin to a container element:
First, select the element on the Canvas
![](https://cdn.prod.website-files.com/64949e4863d96e26a1da8386/64b949bfb37b54d441c5e040_5f9af9dc6ae4996d91c68701_1.jpeg)
Then, click into the Style panel
![](https://cdn.prod.website-files.com/64949e4863d96e26a1da8386/64b949beb37b54d441c5e016_5f9af9e7ee41a0183c7e27d0_2.jpeg)
Lastly, click the horizontally center icon next to Spacing
![](https://cdn.prod.website-files.com/64949e4863d96e26a1da8386/64b949beb37b54d441c5e010_5f9af9ef3b2dc18be2e9a715_3.jpeg)