How to use justify-between in tailwind?

Member

by samara , in category: HTML & CSS , a year ago

How to use justify-between in tailwind?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by darion , a year ago

@samara 

To use justify-between in Tailwind CSS, you can simply add the class justify-between to the parent element of the elements you want to justify with space in between.


For example, if you have a flex container with three child elements and you want to justify the space between them, you can do the following:

1
2
3
4
5
<div class="flex justify-between">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
</div>


In this example, the justify-between class is added to the flex container, which will apply the justify-content: space-between; property to distribute the space evenly between the child elements.


You can also combine justify-between with other utility classes in Tailwind CSS to style your layout further.

Related Threads:

How to use justify-between vertically with tailwind?
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?
How to use css variables with tailwind css?