# Sticky Footer Layout

> Keeps the footer at the bottom of the screen even when the page is short.

- Category: [CSS Layouts](https://copy-css.com/category/layouts)
- Tags: footer, sticky, grid, page, full height
- Live preview: https://copy-css.com/snippets/sticky-footer
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="page">
  <div>Header</div>
  <div>Content</div>
  <div>Footer</div>
</div>
```

## CSS

```css
/* Header and footer size to content; the middle row fills the rest */
.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}
```

## Notes

- This CSS Sticky Footer Layout is 6 lines of pure CSS (0.2 KB) with no JavaScript and no dependencies. It uses CSS Grid.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
