Created
April 22, 2014 23:35
-
-
Save snarf1974/11197998 to your computer and use it in GitHub Desktop.
CSS: Sticky footer 1
This file contains hidden or 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
.container { | |
margin-bottom: -142px; | |
min-height: 100%; | |
/* equal to footer height */ | |
} | |
.container:after { | |
content: ""; | |
display: block; | |
} | |
.site-footer, .container:after { | |
height: 142px; | |
} | |
.site-footer { | |
background: #385978; | |
border-top: 1px solid #000; | |
color: white; | |
height: 141px; /*========== Height and border-top added together = 142px used in .container and .site-footer ==========*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment