Ashley Cameron Design

Ashley Cameron Design

Sticky Footer

This post was last updated: Sep 3, 2020
CSSSnippets

About a 1 minute read

"It’s not what you look at that matters, it’s what you see."

Henry David Thoreau


1
2
3
4
5
6
7
8
9
10
11
12
13
* {margin: 0;}
html, body {height: 100%;}
.wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
    height: 142px; /* .push must be the same height as .footer */
}

/* Sticky Footer by Ryan Fait http://ryanfait.com/ */