Skip to content

Instantly share code, notes, and snippets.

@ekryski
Created November 1, 2012 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekryski/3996954 to your computer and use it in GitHub Desktop.
Save ekryski/3996954 to your computer and use it in GitHub Desktop.
Full Bodied Sticky Footer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Full Bodied Sticky Footer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<style type="text/css">
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
#wrapper {
min-height: 100%;
height: auto;
height: 100%;
margin: 0 auto -100px;
background-color: red;
}
#header {
position: fixed;
top: 0;
width: 100%;
background: #438a48;
height:100px;
}
#body {
background: #111;
position: fixed;
left: 0px;
right: 0px;
bottom: 100px;
top: 100px;
}
footer, #push {
background: #df781c;
height:100px;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">Header</div>
<div id="body"></div>
<div id="push"></div>
</div>
<footer>
Footer
</footer>
<!-- <div id="footer">Footer</div> -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment