Box Alignment
In addition to using flexbox to place items on the page, Tailwind includes utilities that allow you to be more specific about the alignment and justification of elements within the flexbox. These utilities also work for grid layouts, where appropriate.
I talked about how a flexbox container has a main axis and a cross axis. The Tailwind utilities that affect placement along the main axis all start with justify-, and utilities that affect placement across the cross axis don’t. These names are chosen to match the names of the underlying CSS properties.
Main Axis
Let’s look at the main axis first. Item placement can be specified along the main axis in two ways: placement of the item along the main axis of the entire flexbox, and placement ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access