
- Tailwind CSS Tutorial
- Tailwind CSS - Home
- Tailwind CSS - Roadmap
- Tailwind CSS - Introduction
- Tailwind CSS - Installation
- Tailwind CSS - Editor Setup
- Tailwind CSS - Core Concepts
- Tailwind CSS - Utility-First Fundamentals
- Tailwind CSS - Hover, Focus, and Other States
- Tailwind CSS - Responsive Design
- Tailwind CSS - Dark Mode
- Tailwind CSS - Reusing Styles
- Tailwind CSS - Adding Custom Styles
- Tailwind CSS - Functions & Directives
- Tailwind CSS - Customization
- Tailwind CSS - Configuration
- Tailwind CSS - Content Configuration
- Tailwind CSS - Theme Configuration
- Tailwind CSS - Customizing Screens
- Tailwind CSS - Customizing Colors
- Tailwind CSS - Customizing Spacing
- Tailwind CSS - Plugins
- Tailwind CSS - Presets
- Tailwind CSS - Base Styles
- Tailwind CSS - Preflight
- Tailwind CSS - Layout
- Tailwind CSS - Aspect Ratio
- Tailwind CSS - Container
- Tailwind CSS - Columns
- Tailwind CSS - Break After
- Tailwind CSS - Break Before
- Tailwind CSS - Break Inside
- Tailwind CSS - Box Decoration Break
- Tailwind CSS - Box Sizing
- Tailwind CSS - Display
- Tailwind CSS - Floats
- Tailwind CSS - Clear
- Tailwind CSS - Isolation
- Tailwind CSS - Object Fit
- Tailwind CSS - Object Position
- Tailwind CSS - Overflow
- Tailwind CSS - Overscroll Behavior
- Tailwind CSS - Position
- Tailwind CSS - Top / Right / Bottom / Left
- Tailwind CSS - Visibility
- Tailwind CSS - Z-Index
- Tailwind CSS - Flexbox & Grid
- Tailwind CSS - Flex Basis
- Tailwind CSS - Flex Direction
- Tailwind CSS - Flex Wrap
- Tailwind CSS - Flex
- Tailwind CSS - Flex Grow
- Tailwind CSS - Flex Shrink
- Tailwind CSS - Order
- Tailwind CSS - Grid Template Columns
- Tailwind CSS - Grid Column Start / End
- Tailwind CSS - Grid Template Rows
- Tailwind CSS - Grid Row Start / End
- Tailwind CSS - Grid Auto Flow
- Tailwind CSS - Grid Auto Columns
- Tailwind CSS - Grid Auto Rows
- Tailwind CSS - Gap
- Tailwind CSS - Justify Content
- Tailwind CSS - Justify Items
- Tailwind CSS - Justify Self
- Tailwind CSS - Align Content
- Tailwind CSS - Align Items
- Tailwind CSS - Align Self
- Tailwind CSS - Place Content
- Tailwind CSS - Place Items
- Tailwind CSS - Place Self
- Tailwind CSS - Spacing
- Tailwind CSS - Padding
- Tailwind CSS - Margin
- Tailwind CSS - Space Between
- Tailwind CSS - Sizing
- Tailwind CSS - Width
- Tailwind CSS - Min-Width
- Tailwind CSS - Max-Width
- Tailwind CSS - Height
- Tailwind CSS - Min-Height
- Tailwind CSS - Max-Height
- Tailwind CSS - Size
- Tailwind CSS - Typography
- Tailwind CSS - Font Family
- Tailwind CSS - Font Size
- Tailwind CSS - Font Smoothing
- Tailwind CSS - Font Style
- Tailwind CSS - Font Weight
- Tailwind CSS - Font Variant Numeric
- Tailwind CSS - Letter Spacing
- Tailwind CSS - Line Clamp
- Tailwind CSS - Line Height
- Tailwind CSS - List Style Image
- Tailwind CSS - List Style Position
- Tailwind CSS - List Style Type
- Tailwind CSS - Text Align
- Tailwind CSS - Text Color
- Tailwind CSS - Text Decoration
- Tailwind CSS - Text Decoration Color
- Tailwind CSS - Text Decoration Style
- Tailwind CSS - Text Decoration Thickness
- Tailwind CSS - Text Underline Offset
- Tailwind CSS - Text Transform
- Tailwind CSS - Text Overflow
- Tailwind CSS - Text Wrap
- Tailwind CSS - Text Indent
- Tailwind CSS - Vertical Align
- Tailwind CSS - Whitespace
- Tailwind CSS - Word Break
- Tailwind CSS - Hyphens
- Tailwind CSS - Content
- Tailwind CSS - Backgrounds
- Tailwind CSS - Background Attachment
- Tailwind CSS - Background Clip
- Tailwind CSS - Background Color
- Tailwind CSS - Background Origin
- Tailwind CSS - Background Position
- Tailwind CSS - Background Repeat
- Tailwind CSS - Background Size
- Tailwind CSS - Background Image
- Tailwind CSS - Gradient Color Stops
- Tailwind CSS - Borders
- Tailwind CSS - Border Radius
- Tailwind CSS - Border Width
- Tailwind CSS - Border Color
- Tailwind CSS - Border Style
- Tailwind CSS - Divide Width
- Tailwind CSS - Divide Color
- Tailwind CSS - Divide Style
- Tailwind CSS - Outline Width
- Tailwind CSS - Outline Color
- Tailwind CSS - Outline Style
- Tailwind CSS - Outline Offset
- Tailwind CSS - Ring Width
- Tailwind CSS - Ring Color
- Tailwind CSS - Ring Offset Width
- Tailwind CSS - Ring Offset Color
- Tailwind CSS - Effects
- Tailwind CSS - Box Shadow
- Tailwind CSS - Box Shadow Color
- Tailwind CSS - Opacity
- Tailwind CSS - Mix Blend Mode
- Tailwind CSS - Background Blend Mode
- Tailwind CSS - Filters
- Tailwind CSS - Blur
- Tailwind CSS - Brightness
- Tailwind CSS - Contrast
- Tailwind CSS - Drop Shadow
- Tailwind CSS - Grayscale
- Tailwind CSS - Hue Rotate
- Tailwind CSS - Invert
- Tailwind CSS - Saturate
- Tailwind CSS - Sepia
- Tailwind CSS - Backdrop Blur
- Tailwind CSS - Backdrop Brightness
- Tailwind CSS - Backdrop Contrast
- Tailwind CSS - Backdrop Grayscale
- Tailwind CSS - Backdrop Hue Rotate
- Tailwind CSS - Backdrop Invert
- Tailwind CSS - Backdrop Opacity
- Tailwind CSS - Backdrop Saturate
- Tailwind CSS - Backdrop Sepia
- Tailwind CSS - Tables
- Tailwind CSS - Border Collapse
- Tailwind CSS - Border Spacing
- Tailwind CSS - Table Layout
- Tailwind CSS - Caption Side
- Tailwind CSS - Transitions & Animation
- Tailwind CSS - Transition Property
- Tailwind CSS - Transition Duration
- Tailwind CSS - Transition Timing Function
- Tailwind CSS - Transition Delay
- Tailwind CSS - Animation
- Tailwind CSS - Transform
- Tailwind CSS - Scale
- Tailwind CSS - Rotate
- Tailwind CSS - Translate
- Tailwind CSS - Skew
- Tailwind CSS - Transform Origin
- Tailwind CSS - Interactivity
- Tailwind CSS - Accent Color
- Tailwind CSS - Appearance
- Tailwind CSS - Cursor
- Tailwind CSS - Caret Color
- Tailwind CSS - Pointer Events
- Tailwind CSS - Resize
- Tailwind CSS - Scroll Behavior
- Tailwind CSS - Scroll Margin
- Tailwind CSS - Scroll Padding
- Tailwind CSS - Scroll Snap Align
- Tailwind CSS - Scroll Snap Stop
- Tailwind CSS - Scroll Snap Type
- Tailwind CSS - Touch Action
- Tailwind CSS - User Select
- Tailwind CSS - Will Change
- Tailwind CSS - SVG
- Tailwind CSS - Fill
- Tailwind CSS - Stroke
- Tailwind CSS - Stroke Width
- Tailwind CSS - Accessibility
- Tailwind CSS - Screen Readers
- Tailwind CSS - Forced Color Adjust
- Tailwind CSS - Bonus
- Tailwind CSS - Using with Preprocessors
- Tailwind CSS - Optimizing for Production
- Tailwind CSS - References
- Tailwind CSS - Core Concepts
- Tailwind CSS - Customization
- Tailwind CSS - Layout
- Tailwind CSS - Flexbox & Grid
- Tailwind CSS - Spacing
- Tailwind CSS - Sizing
- Tailwind CSS - Typography
- Tailwind CSS - Backgrounds
- Tailwind CSS - Borders
- Tailwind CSS - Effects
- Tailwind CSS - Filters
- Tailwind CSS - Tables
- Tailwind CSS - Transitions & Animation
- Tailwind CSS - Transforms
- Tailwind CSS - Interactivity
- Tailwind CSS - Resources
- Tailwind CSS - Discussion
- Tailwind CSS - Useful Resources
Tailwind CSS - Min-Height
Tailwind CSS min-height is a utility class that provides an effective way of handling the content min-height. This is used to set the min-height or manipulate the min-height of any HTML elements.
Tailwind CSS Min-Height Classes
The following is the list of Tailwind CSS min-height classes that provide an effective way of handling content min-height.
Class | CSS Properties |
---|---|
min-h-0 | min-height: 0px; |
min-h-1 | min-height: 0.25rem; /* 4px */ |
min-h-2 | min-height: 0.5rem; /* 8px */ |
min-h-3 | min-height: 0.75rem; /* 12px */ |
min-h-4 | min-height: 1rem; /* 16px */ |
min-h-5 | min-height: 1.25rem; /* 20px */ |
min-h-6 | min-height: 1.5rem; /* 24px */ |
min-h-7 | min-height: 1.75rem; /* 28px */ |
min-h-8 | min-height: 2rem; /* 32px */ |
min-h-9 | min-height: 2.25rem; /* 36px */ |
min-h-10 | min-height: 2.5rem; /* 40px */ |
min-h-11 | min-height: 2.75rem; /* 44px */ |
min-h-12 | min-height: 3rem; /* 48px */ |
min-h-14 | min-height: 3.5rem; /* 56px */ |
min-h-16 | min-height: 4rem; /* 64px */ |
min-h-20 | min-height: 5rem; /* 80px */ |
min-h-24 | min-height: 6rem; /* 96px */ |
min-h-28 | min-height: 7rem; /* 112px */ |
min-h-32 | min-height: 8rem; /* 128px */ |
min-h-36 | min-height: 9rem; /* 144px */ |
min-h-40 | min-height: 10rem; /* 160px */ |
min-h-44 | min-height: 11rem; /* 176px */ |
min-h-48 | min-height: 12rem; /* 192px */ |
min-h-52 | min-height: 13rem; /* 208px */ |
min-h-56 | min-height: 14rem; /* 224px */ |
min-h-60 | min-height: 15rem; /* 240px */ |
min-h-64 | min-height: 16rem; /* 256px */ |
min-h-72 | min-height: 18rem; /* 288px */ |
min-h-80 | min-height: 20rem; /* 320px */ |
min-h-96 | min-height: 24rem; /* 384px */ |
min-h-px | min-height: 1px; |
min-h-0.5 | min-height: 0.125rem; /* 2px */ |
min-h-1.5 | min-height: 0.375rem; /* 6px */ |
min-h-2.5 | min-height: 0.625rem; /* 10px */ |
min-h-3.5 | min-height: 0.875rem; /* 14px */ |
min-h-full | min-height: 100%; |
min-h-screen | min-height: 100vh; |
min-h-svh | min-height: 100svh; |
min-h-lvh | min-height: 100lvh; |
min-h-dvh | min-height: 100dvh; |
min-h-min | min-height: min-content; |
min-h-max | min-height: max-content; |
min-h-fit | min-height: fit-content; |
Functionality of Tailwind CSS Min-Height Classes
- min-h-*: This class is used to set a specific minimum height of any element, the * is representing a number that can be any acceptable value from the above table.
- min-h-px: This class sets the minimum height of the element 1px.
- min-h-auto: This class define the minimum height of the element based on the content.
- min-h-1/2: This specifies the minimum height is set to half of the window.
- min-h-1/3: This specifies the minimum height is set to one-third of the window.
- min-h-1/4: This specifies the minimum height is set to one-fourth of the window.
- min-h-1/5: This specifies the minimum height is set to one-fifth of the window.
- min-h-1/6: This specifies the minimum height is set to one-sixth of the window.
- min-h-full: This class sets the minimum height at it's full potential.
- min-h-screen: This specifies the minimum height is set to the screen size.
- min-h-svh: This class sets the minimum height of the element 100 svw.
- min-h-lvh: This class sets the minimum height of the element 100 lvh.
- min-h-dvh: This class sets the minimum height of the element 100 dvh
- min-h-min: This class is used to specify the min-height at minimum capacity.
- min-h-max: This class is used to specify the min-height at maximum capacity.
- min-h-fit: This class sets the minimum height to fit the content into the parent.
Tailwind CSS Minimum Height Class Examples
The following examples will illustrate the Tailwind CSS Minimum Height class utility.
Setting Minimum Height
We have used the CSS minimum-height property so many times, as here we can achieve that by using the mentioned classes as well.
Example
Here in this example, we will create four elements and set different minimum heights by using the above-mentioned classes.
<!DOCTYPE html> <html> <head> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="p-4"> <h2 class="text-2xl mb-2"> Tailwind CSS Minimum Height Class </h2> <div class="flex"> <div class="h-64 bg-green-200 p-2 text-center w-fit "> <div class="min-h-full w-20 bg-green-400"> min-h-full </div> </div> <div class="h-64 bg-green-200 p-2 text-center w-fit"> <div class="min-h-8 w-20 bg-green-400"> min-h-8 </div> </div> <div class="h-64 bg-green-200 p-2 text-center w-fit"> <div class="min-h-24 w-20 bg-green-400"> min-h-24 </div> </div> <div class="h-64 bg-green-200 p-2 text-center w-fit"> <div class="min-h-48 w-20 bg-green-400"> min-h-48 </div> </div> </div> </body> </html>
Conditional Minimum Height
We can change the minimum height value based on conditions like hover, focus, or screen size. To set a condition on any element's minimum height, we can use `hover` and `focus` classes.
Example
In the following example, we will change the minimum height value when hovering over the element.
<!DOCTYPE html> <html> <head> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="p-4"> <h2 class="text-2xl mb-2"> Tailwind CSS Minimum Height Class </h2> <div class="flex"> <div class="h-64 bg-green-200 p-2 text-center w-fit "> <div class="min-h-full w-20 bg-green-400"> min-h-full </div> </div> <div class="h-64 bg-green-200 p-2 text-center w-fit"> <div class="min-h-8 hover:min-h-16 w-20 bg-green-400"> Hover </div> </div> <div class="h-64 bg-green-200 p-2 text-center w-fit"> <div class="min-h-24 hover:min-h-16 w-20 bg-green-400"> Hover </div> </div> <div class="h-64 bg-green-200 p-2 text-center w-fit"> <div class="min-h-48 hover:min-h-16 w-20 bg-green-400"> Hover </div> </div> </div> </body> </html>