Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
245 views
in Technique[技术] by (71.8m points)

html - TailwindCSS justity-between while ignoring child size

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>
question from:https://stackoverflow.com/questions/65930045/tailwindcss-justity-between-while-ignoring-child-size

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...