How to use justify-between in tailwind?


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

How to use justify-between in tailwind?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer


by darion , 2 months ago


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:

<div class="flex justify-between">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</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.