h-full: Tailwind CSS Height class

The h-full class forces an element to take up 100% of the height of its parent container.


h-full

The h-full class forces an element to take up 100% of the height of its parent container. This is useful when creating full-height layouts or aligning child elements to fill their container.

Code Example

html
<div class="h-32">
<div class="h-full bg-indigo-500 text-white text-center flex justify-center items-center font-bold rounded-md">Height: full</div>
</div>

Preview

Height: full

How to Use

Add the h-full class directly to your HTML element:

html
<div class="h-full">
<!-- Your content here -->
</div>

Responsive Usage

Use Tailwind's responsive prefixes to apply h-full at specific breakpoints:

html
<div class="sm:h-full md:h-full lg:h-full">
Responsive element
</div>
  • sm:h-full — applies from 640px and up
  • md:h-full — applies from 768px and up
  • lg:h-full — applies from 1024px and up

Customization

You 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

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates