How to center a div in tailwindcss
Published: Apr 19, 2022
Using grid and flex, we'll center a div element horizontally and vertically on a page.
<!-- by grid --> <div class="grid place-items-center h-screen"> Centered using Tailwind. </div> <!-- by flex --> <div class="flex justify-center items-center h-screen"> Centered using Tailwind. </div>
Md Najmul Hasan https://shouts.dev/imnhasan