Created
September 25, 2012 20:57
-
-
Save StevenLangbroek/3784392 to your computer and use it in GitHub Desktop.
Footer stuck to bottom of page
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> | |
<head> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
} | |
#content { | |
min-height: 100%; | |
padding-bottom: 40px; // Gelijk aan de hoogte van de footer | |
} | |
#footer { | |
height: 40px; | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
} | |
</style> | |
</head> | |
<div id="content"> | |
<h1>Hello world!</h1> | |
<p>Content!</p> | |
<div id="footer"> | |
<p>Lorem ipsum!</p> | |
</div> | |
</div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment