This content originally appeared on flaviocopes.com and was authored by flaviocopes.com
I always tend to forget how to align center vertically using Flexbox.
You need a container with those CSS instructions:
display: flex;
align-items: center;
justify-content: center;In Tailwind, this translates to the classes flex items-center justify-center.
Example:
<div class='flex items-center justify-center'>
<button>Add</button>
</div>
This content originally appeared on flaviocopes.com and was authored by flaviocopes.com
flaviocopes.com | Sciencx (2021-05-06T05:00:00+00:00) How to align center vertically using Tailwind. Retrieved from https://www.scien.cx/2021/05/06/how-to-align-center-vertically-using-tailwind/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.