Skip to content
Justice Tech School

Sticky Footer

Use flex column and mt-auto.

Example
<body class="d-flex flex-column min-vh-100">
  <main class="flex-grow-1">Content</main>
  <footer class="mt-auto bg-dark text-white p-3">Footer</footer>
</body>

Exercise

Fill space.

class="flex--1"

Quiz Test

What pushes the footer down?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.