Utilities for setting the maximum height of an element

Class reference

max-h-0max-height: 0;
max-h-pxmax-height: 1px;
max-h-0.5max-height: 0.125rem;
max-h-1max-height: 0.25rem;
max-h-1.5max-height: 0.375rem;
max-h-2max-height: 0.5rem;
max-h-2.5max-height: 0.625rem;
max-h-3max-height: 0.75rem;
max-h-3.5max-height: 0.875rem;
max-h-4max-height: 1rem;
max-h-4.5max-height: 1.125rem;
max-h-5max-height: 1.25rem;
max-h-6max-height: 1.5rem;
max-h-7max-height: 1.75rem;
max-h-8max-height: 2rem;
max-h-9max-height: 2.25rem;
max-h-10max-height: 2.5rem;
max-h-11max-height: 2.75rem;
max-h-12max-height: 3rem;
max-h-13max-height: 3.25rem;
max-h-14max-height: 3.5rem;
max-h-15max-height: 3.75rem;
max-h-16max-height: 4rem;
max-h-18max-height: 4.5rem;
max-h-20max-height: 5rem;
max-h-24max-height: 6rem;
max-h-28max-height: 7rem;
max-h-32max-height: 8rem;
max-h-36max-height: 9rem;
max-h-40max-height: 10rem;
max-h-48max-height: 12rem;
max-h-56max-height: 14rem;
max-h-60max-height: 15rem;
max-h-64max-height: 16rem;
max-h-72max-height: 18rem;
max-h-80max-height: 20rem;
max-h-96max-height: 24rem;
max-h-fullmax-height: 100%;
max-h-screenmax-height: 100vh;
max-h-1/4max-height: 25%;
max-h-1/2max-height: 50%;
max-h-3/4max-height: 75%;
max-h-screen-25max-height: 25vh;
max-h-screen-50max-height: 50vh;
max-h-screen-75max-height: 75vh;


Set the maximum height of an element using the max-h-full or max-h-screen utilities.

<div class="h-24 ...">
<div class="h-48 max-h-full ...">


To control the max-height of an element at a specific breakpoint, add a {screen}: prefix to any existing max-height utility.

<div class="h-48 max-h-full **md:max-h-screen** ...">

For more information about Elements’ responsive design features, check out the Responsive Design documentation.