I'm currently using TailwindCSS and attempting to make a <div>
adjust in height based on its child, a <button>
. Below is my code snippet:
<form className="w-full flex h-96 gap-2 mt-8 flex-wrap">
<textarea
role="text-input"
className="resize-none flex-1"
placeholder="INPUT"
/>
<textarea
role="text-output"
className="resize-none flex-1"
placeholder="OUTPUT"
readOnly
/>
<div className="w-full flex flex-none"> // Here lies the issue
<button>
Submit!
</button>
</div>
</form>
After reviewing the documentation and conducting some research online, I have been unsuccessful in finding a way to achieve this. My ideal solution would involve creating a custom class like h-fit-content
, but it appears that option is not available.
Thank you for your help!