Created
October 18, 2013 18:45
-
-
Save nathan-isaac/7046155 to your computer and use it in GitHub Desktop.
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
<div class="page-wrap"> | |
Content! | |
</div> | |
<footer class="site-footer"> | |
I'm the Sticky Footer. | |
</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
* { | |
margin: 0; | |
} | |
html, body { | |
height: 100%; | |
} | |
.page-wrap { | |
min-height: 100%; | |
/* equal to footer height */ | |
margin-bottom: -142px; | |
} | |
.page-wrap:after { | |
content: ""; | |
display: block; | |
} | |
.site-footer, .page-wrap:after { | |
/* .push must be the same height as footer */ | |
height: 142px; | |
} | |
.site-footer { | |
background: orange; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment