Skip to content

Instantly share code, notes, and snippets.

@snarf1974
Created April 22, 2014 23:26
Show Gist options
  • Save snarf1974/11197846 to your computer and use it in GitHub Desktop.
Save snarf1974/11197846 to your computer and use it in GitHub Desktop.
CSS: Sticky footer 2
* {
margin: 0;
}
html {
height: 100%;
}
html, body {
margin: 0;
padding: 0;
border: 0;
box-sizing: border-box;
}
body {
position: relative;
min-height: 100%;
padding-top: 15px;
padding-bottom: 152px;
}
footer.site-footer div {
width: 900px;
margin: 0px auto;
}
.site-footer {
position: absolute;
background: #385978;
border-top: 10px solid #d7cdbc;
color: white;
height: 142px; /*========== Height and border-top added together = 151px used in .site-footer ==========*/
width: 100%;
bottom: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment