How to use justify-between vertically with tailwind?

by haylee.mertz , in category: HTML & CSS , a year ago

How to use justify-between vertically with tailwind?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by orpha , a year ago

@haylee.mertz 

To use justify-between vertically with Tailwind CSS, you can apply the justify-between class to the justify-items utility in your HTML markup. Here's an example:

1
2
3
4
5
<div class="flex flex-col justify-between h-full">
  <div class="bg-red-200">Item 1</div>
  <div class="bg-blue-200">Item 2</div>
  <div class="bg-green-200">Item 3</div>
</div>


In this example, the flex flex-col classes make the parent container a flex container that stacks its children vertically. Then, the justify-between class is used to evenly distribute the children vertically in the available space.


You can adjust the height of the parent container by adding the h-full class or any other height utility class provided by Tailwind CSS to achieve the desired layout.

Related Threads:

How to use justify-between in tailwind?
How to perfectly align text vertically in tailwind css?
How to use flex in tailwind?
How to use calc() in tailwind css?
How to use grid in tailwind css?
How to use tailwind inside an iframe?