Skip to content

Instantly share code, notes, and snippets.

@airgead73
Last active January 11, 2018 18:02
Show Gist options
  • Select an option

  • Save airgead73/2137e621b57ca537432c5a245898adc2 to your computer and use it in GitHub Desktop.

Select an option

Save airgead73/2137e621b57ca537432c5a245898adc2 to your computer and use it in GitHub Desktop.
CSS for sticky footer
/*
Margin-bottom on <body> should be same as height on <footer>
*/
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment