Created
November 1, 2012 22:03
-
-
Save ekryski/3996954 to your computer and use it in GitHub Desktop.
Full Bodied Sticky Footer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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