Open this example in the interactive library
Source code
<div class="demo w-40 mx-auto">Centre a fixed-width box with margins</div>
Centre a fixed-width box with margins with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<div class="demo w-40 mx-auto">Centre a fixed-width box with margins</div>