skip to content
Alvin Lucillo

Responsive width & center aligned

/ 1 min read

💻 Tech

In Tailwind, you can use the combination of center and m-auto classes to ensure the component has a responsive width according to the screen size (center) and is horizontally centered within its parent element wiht margin set to auto (m-auto)

<div class="container m-auto"></div>