Tailwind CSS v1.0 is here! Learn more →

Vertical Alignment

Utilities for controlling the vertical alignment of an inline or table-cell box.

Work in progress!

More detailed documentation is coming soon, but in the meantime here's a quick class reference.

Class reference

Class Properties
.align-baseline vertical-align: baseline;
.align-top vertical-align: top;
.align-middle vertical-align: middle;
.align-bottom vertical-align: bottom;
.align-text-top vertical-align: text-top;
.align-text-bottom vertical-align: text-bottom;

Customizing

Responsive and State Variants

By default, only responsive variants are generated for vertical alignment utilities.

You can control which variants are generated for the vertical alignment utilities by modifying the verticalAlign property in the modules section of your Tailwind config file.

For example, this config will also generate hover and focus variants:

{
// ...
modules: {
    // ...
-   verticalAlign: ['responsive'],
+   verticalAlign: ['responsive', 'hover', 'focus', 'active', 'group-hover'],
}
}

Disabling

If you don't plan to use the vertical alignment utilities in your project, you can disable them entirely by setting the verticalAlign property to false in the modules section of your config file:

{
// ...
modules: {
    // ...
-   verticalAlign: ['responsive'],
+   verticalAlign: false,
}
}