Skip to main content

Max-Height

Utilities for setting the maximum height of an element.

CSS Property:max-height
Classes:27

Max-Height Classes

ClassCSS
max-h-0max-height: 0;
max-h-pxmax-height: 1px;
max-h-1max-height: 0.25rem;
max-h-2max-height: 0.5rem;
max-h-4max-height: 1rem;
max-h-8max-height: 2rem;
max-h-12max-height: 3rem;
max-h-16max-height: 4rem;
max-h-20max-height: 5rem;
max-h-24max-height: 6rem;
max-h-32max-height: 8rem;
max-h-40max-height: 10rem;
max-h-48max-height: 12rem;
max-h-56max-height: 14rem;
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-svhmax-height: 100svh;
max-h-lvhmax-height: 100lvh;
max-h-dvhmax-height: 100dvh;
max-h-minmax-height: min-content;
max-h-maxmax-height: max-content;
max-h-fitmax-height: fit-content;
max-h-nonemax-height: none;

Arbitrary Values

You can use arbitrary values with square bracket notation when you need a specific value not included in the default scale.

[max-height:value]

Responsive Variants

Apply max-height utilities at specific breakpoints using responsive prefixes.

BreakpointPrefixExample
640px+sm:sm:max-h-0
768px+md:md:max-h-0
1024px+lg:lg:max-h-0
1280px+xl:xl:max-h-0
1536px+2xl:2xl:max-h-0