Margin auto

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-04-25

Use this to stop elements taking up more space than their contents

e.g. d. The mere addition of margin auto on the x axis caused a button , previously full width, to now take up a width of its actual text size.