Wrap the input and div inside another div; and add a border, e.g.
<div class="flex border border-gray-300">
<input type="text">
<div>hello</div>
</div>
A Tailwind input should have no styles by default.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How can I basically glue these to elements one next to each other like in the next picture? The first one is an input, and the second is a div. I use tailwind https://imgur.com/a/RI0ClKk
like this:
@TikTina set a width on the parent; or make the parent inline-flex
<div class="border border-gray-300 inline-flex">
<input type="text" class="w-64">
<div>hello</div>
</div>
Please or to participate in this conversation.