Alignment and Spacing
Explore how to apply Tailwind CSS classes to manage horizontal and vertical text alignment, control line height with relative and absolute spacing, adjust letter spacing, and style lists. This lesson helps you understand and customize typography to enhance web page readability and design.
We'll cover the following...
We'll cover the following...
Alignment of text
Several Tailwind classes are used to specify the horizontal alignment of text. These are listed below:
.text-left.text-center.text-right.text-justify
They all change the CSS text-align property. The exact bounds of the alignment depend on the box in the next chapter.
Vertical alignment
The CSS property for vertical alignment is vertical-align, and these are the Tailwind classes:
.align-baseline.align-top.align-middle.align-bottom.align-text-top