Published on

Text align in Tailwind

Authors
  • avatar
    Name
    Gene Zhang
    Twitter

You need to give your wrapper known width to know where to break words. I made you an example with and without grid.

Tailwind Play: https://play.tailwindcss.com/Xdfb5j1C8h

justify-center: how items are aligned on the main axis

items-center: how items are aligned on the cross axis

To horizontally center a block element (like <div>), use margin: auto