Ask any question about Bootstrap here... and get an instant response.
Post this Question & Answer:
How can I implement a sticky footer using Bootstrap utilities?
Asked on May 11, 2026
Answer
To implement a sticky footer using Bootstrap utilities, you can use the `vh-100` utility class to ensure the main content takes up the full viewport height, and the `mt-auto` class to push the footer to the bottom.
<!-- BEGIN COPY / PASTE -->
<div class="d-flex flex-column vh-100">
<main class="flex-grow-1">
<!-- Your main content here -->
</main>
<footer class="mt-auto bg-light p-3">
<!-- Footer content here -->
</footer>
</div>
<!-- END COPY / PASTE -->Additional Comment:
✅ Answered with Bootstrap 5 best practices.- The `d-flex` and `flex-column` classes create a flexbox container with a column layout.
- The `vh-100` class ensures the container takes up the full viewport height.
- The `flex-grow-1` class allows the main content to expand and fill available space.
- The `mt-auto` class pushes the footer to the bottom of the page.
- Ensure your footer has some content or padding for better visibility.
Recommended Links:
