Created
March 30, 2012 13:11
-
-
Save tpthn/2251435 to your computer and use it in GitHub Desktop.
CSS - Keep bottom bar stay down
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
<body> | |
<div id="wrapper"> | |
<div id="header"></div> | |
<div id="content"></div> | |
<div id="footer"></div> | |
</div> | |
</body> | |
<!----and the CSS------> | |
html, | |
body { | |
margin:0; | |
padding:0; | |
height:100%; | |
} | |
#wrapper { | |
min-height:100%; | |
position:relative; | |
} | |
#header { | |
padding:10px; | |
background:#5ee; | |
} | |
#content { | |
padding:10px; | |
padding-bottom:80px; /* Height of the footer element */ | |
} | |
#footer { | |
width:100%; | |
height:80px; | |
position:absolute; | |
bottom:0; | |
left:0; | |
background:#ee5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment