max-h-64: Tailwind CSS Height class
The max-h-64 class ensures that an element does not grow beyond 16rem (256 pixels).
max-h-64
The max-h-64
class ensures that an element does not grow beyond 16rem (256 pixels). It is useful for keeping sections at a reasonable height while allowing content to fit.
Code Example
html
<div class="flex justify-center items-center"><div class="w-96 border border-indigo-300 rounded-lg p-4 max-h-64 overflow-y-auto"> <h2 class="text-lg font-bold mb-2">Chat</h2> <div class="space-y-2"> <p class="bg-gray-100 p-2 rounded">User 1: Hello!</p> <p class="bg-indigo-100 p-2 rounded">User 2: Hi there!</p> <p class="bg-gray-100 p-2 rounded">User 1: How's it going?</p> <p class="bg-indigo-100 p-2 rounded">User 2: Great! You?</p> <p class="bg-gray-100 p-2 rounded">User 1: Doing well, thanks!</p> </div></div></div>
Preview
Chat
User 1: Hello!
User 2: Hi there!
User 1: How's it going?
User 2: Great! You?
User 1: Doing well, thanks!
Windframe is a drag and drop builder for rapidly building tailwind css websites and UIs
Start building stunning tailwind UIs!
