Windframe
Build Tailwind UIs that actually look good!
.jpg)
The max-h-16 class limits the maximum height of an element to 4rem (64 pixels).
The max-h-16 class limits the maximum height of an element to 4rem (64 pixels). This is useful when you need to ensure elements don’t exceed a certain size.
<div class="flex justify-center items-center bg-indigo-100 mt-2 rounded-t"> <div class="relative"> <button class="bg-indigo-500 text-white px-4 py-2 rounded">Menu</button> <ul class="absolute w-40 bg-white shadow-lg rounded max-h-12 overflow-y-auto"> <li class="p-2 hover:bg-indigo-200 cursor-pointer font-medium">Option 1</li> <li class="p-2 hover:bg-indigo-200 cursor-pointer font-medium">Option 2</li> <li class="p-2 hover:bg-indigo-200 cursor-pointer font-medium">Option 3</li> <li class="p-2 hover:bg-indigo-200 cursor-pointer font-medium">Option 4</li> </ul></div></div>Add the max-h-16 class directly to your HTML element:
<div class="max-h-16"> <!-- Your content here --></div>Use Tailwind's responsive prefixes to apply max-h-16 at specific breakpoints:
<div class="sm:max-h-16 md:max-h-16 lg:max-h-16"> Responsive element</div>sm:max-h-16 — applies from 640px and upmd:max-h-16 — applies from 768px and uplg:max-h-16 — 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
