Problem: Footer should sit at the bottom even with short content.
Solution#
<body class="min-h-screen flex flex-col">
<main class="flex-1">content</main>
<footer class="border-t py-8">footer</footer>
</body>Why this works#
min-h-screen + flex-col + flex-1 main pushes the footer down without fixed positioning.
Variants#
- Responsive: add screen prefixes to the core classes
- Dark: pair each color utility with its dark: twin
- Animated: add
transition+ a state variant for motion
Related recipes#
cookbook/index|Cookbook index · utilities/index|Utilities reference · patterns/index|Layout patterns
