Created
September 23, 2010 08:49
-
-
Save DanielOberg/593353 to your computer and use it in GitHub Desktop.
CSS - 100% height with 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
/** | |
* Minimal version of: | |
* http://www.xs4all.nl/~peterned/examples/csslayout1.html | |
*/ | |
html,body { | |
margin:0; | |
padding:0; | |
height:100%; /* needed for container min-height */ | |
} | |
div#container { | |
position:relative; /* needed for footer positioning*/ | |
margin:0 auto; | |
width:750px; | |
height:auto !important; | |
min-height:100%; | |
} | |
div#content { | |
padding:1em 1em 5em; /* bottom padding for footer */ | |
} | |
div#footer { | |
position:absolute; | |
width:100%; | |
bottom:0; /* stick to bottom */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment