Windframe
Build Tailwind UIs that actually look good!
.jpg)
The max-h-64 class ensures that an element does not grow beyond 16rem (256 pixels).
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.
<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>User 1: Hello!
User 2: Hi there!
User 1: How's it going?
User 2: Great! You?
User 1: Doing well, thanks!
Add the max-h-64 class directly to your HTML element:
<div class="max-h-64"> <!-- Your content here --></div>Use Tailwind's responsive prefixes to apply max-h-64 at specific breakpoints:
<div class="sm:max-h-64 md:max-h-64 lg:max-h-64"> Responsive element</div>sm:max-h-64 — applies from 640px and upmd:max-h-64 — applies from 768px and uplg:max-h-64 — applies from 1024px and upYou can extend or override this utility in your tailwind.config.js. See the Tailwind CSS documentation for details on customizing your theme.
Windframe is an AI visual editor for rapidly building stunning web UIs & websites
