0

Attempting to show a search input and button (grouped) next to a button using flexbox.

<div class="border-r border-gray-900 flex px-6 py-3 w-64">
  <div class="flex flex-grow">
      <input class="border flex-grow w-full" type="search" />
      <button class="bg-blue-500 p-3">search</button>
  </div>
  <button class="bg-blue-500 p-3">+</button>
</div>

For some reason this works nicely in chrome, but the content overlaps in firefox.

How can I fix this to work in firefox? Or is there another workaround that I could use to get the same effect?

https://play.tailwindcss.com/QbrWi7mSxm

2 Answers 2

1

Add min-width: 1px; to input field

Sign up to request clarification or add additional context in comments.

Comments

0

This seems to be working the same in firefox and Chrome:

<div class="border-r border-gray-900 flex px-6 py-3 w-max">
      <input class="border" type="search" />
      <button class="bg-blue-500 p-3">search</button>
      <button class="bg-blue-500 p-3">+</button>
</div>

and it looks like yours I think, the only difference is that the input gets a bit longer, but you can fix that with w- classes

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.