Height
Utilities for setting the height of an element
Class reference
Auto
Use h-auto
to let the browser determine the height for the element.
Screen height
Use h-screen
to make an element span the entire height of the viewport.
Fixed height
Use h-{number}
or h-px
to set an element to a fixed height.
Full height
Use h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.
Responsive
To control the height of an element at a specific breakpoint, add a {screen}:
prefix to any existing width utility. For example, adding the class md:h-full
to an element would apply the h-full
utility at medium screen sizes and above.
<div class="h-8 **md:h-full**"></div>
For more information about Elements’ responsive design features, check out the Responsive Design documentation.
On this Page
v1.13.5