How to use justify-between in tailwind?

Member

by samara , in category: HTML & CSS , 8 months ago

How to use justify-between in tailwind?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by darion , 7 months 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.