When there is just a bit of content inside, it looks like this:
https://i.sstatic.net/E7Vow.png
However, when I add a lot more content, it ends up looking like this:
https://i.sstatic.net/dDSj0.png
This pushes the search bar down. My desired outcome is for the content section to expand and fill up the remaining available height on the user's screen, but never exceed the 100vh of the container. Ideally, a scroll bar would appear if the content goes beyond the container.
<!-- Tailwind -->
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
<!-- Body -->
<div class="flex flex-col h-screen items-stretch bg-blue-300">
<div class="flex flex-col flex-grow pt-3 bg-gray-100 rounded">
<div class="flex border-b border-gray-300 pl-3"><button class="flex py-5 px-5 rounded-tl rounded-tr relative top-1 text-gray-800 ">First Tab</button><button class="flex py-5 px-5 rounded-tl rounded-tr relative top-1 text-gray-800 bg-white border border-gray-300 border-b-white">Second Tab</button></div>
<div class="bg-white flex flex-col flex-grow py-5 px-5 relative border-b space-y-4 border-gray-300">
<div class="space-y-4">
<p class="text-gray-400">25th November 2021</p>
<p>This is some content... (continued) ...content</p>
</div>
</div>
<div class="flex justify-center py-3 h-16 ">
<div class="flex flex-grow px-3">
<div class="flex flex-grow rounded ">
<div data-testid="input-container" class="border-gray-300 flex flex-grow rounded border ">
<div data-testid="call-history-search-icon-container" class="flex px-4 py-2 items-center text-gray-600 bg-gray-200 "><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
<path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128...
</svg></div><input type="text" name="call-history-search" id="call-history-search" data-testid="call-history-search" placeholder="Start typing to search..." class="px-3 flex flex-grow...
</div>
</div><button data-testid="search-reset-button" class="bg-blue-500 hover:bg-blue-600 px-4 py-2 rounded text-white ml-7"><svg stroke="currentColor" fill="currentColor" stroke-width=0 ...
</div>
</div>
</div>
</div>
An example of my progress in Codepen:
https://codepen.io/andydmc/pen/dyzxYKw?editors=1010