Centering

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the CSS-and-design category.

Last Updated: 2024-03-02

To get an element (e.g. a button) to center by putting text-align: center on its parent. Needs no width given.

Or set margin auto on the x axis.