0

How can I position those child divs absolutely regardless of their size? Like middle should be at the middle regardless of its neighbors sizes.

<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"/>
<div class="flex flex-row justify-between">
  <div>fsdf</div>
  <div>middle</div>
  <div>fsdfsdfsfsfsfsfsdfsfsdffsdfsfsfsdfsdfsdfsfsfsdfsdfdfsdfsfdsfs</div>
</div>
thiras
  • 521
  • 1
  • 6
  • 22

2 Answers2

1

You can use grid if you want consistency among them. Check out Grid with equal width

<div class="grid grid-cols-3 break-words">
  <div class="col-span-1">fsdf</div>
  <div class="col-span-1">middle</div>
  <div class="col-span-1">fsdfsdfsfsfsfsfsdfsfsdffsdfsfsfsdfsdfsdfsfsfsdfsdfdfsdfsfdsfs</div>
</div>
Digvijay
  • 7,836
  • 3
  • 32
  • 53
0

You can add flex-1 to your items and also break-all

<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"/>
<div class="flex flex-row justify-between">
  <div class="flex-1 break-all">fsdf</div>
  <div class="flex-1 break-all">middle</div>
  <div class="flex-1 break-all">fsdfsdfsfsfsfsfsdfsfsdffsdfsfsfsdfsdfsdfsfsfsdfsdfdfsdfsfdsfs</div>
</div>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415