Ask any question about Bootstrap here... and get an instant response.
Post this Question & Answer:
How can I create a sticky footer using Bootstrap?
Asked on Apr 07, 2026
Answer
To create a sticky footer using Bootstrap, you can utilize the utility classes to ensure the footer stays at the bottom of the viewport when the content is not tall enough.
<!-- BEGIN COPY / PASTE -->
<div class="d-flex flex-column min-vh-100">
<main class="flex-fill">
<!-- Main content goes here -->
</main>
<footer class="bg-light text-center py-3">
<!-- Footer content goes here -->
Sticky Footer
</footer>
</div>
<!-- END COPY / PASTE -->Additional Comment:
✅ Answered with Bootstrap 5 best practices.- Use the 'd-flex' and 'flex-column' classes on a parent container to create a flexbox layout.
- The 'min-vh-100' class ensures the container takes at least the full viewport height.
- Apply 'flex-fill' to the main content area to allow it to expand and fill the available space.
- The footer will naturally stick to the bottom when the content is shorter than the viewport.
Recommended Links:
