Last active
May 20, 2016 16:05
-
-
Save daphotron/b056212f40eaf3ac2082258e7027909f to your computer and use it in GitHub Desktop.
Absolute footer positioning http://www.sassmeister.com/gist/b056212f40eaf3ac2082258e7027909f
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="wrap"> | |
<div class="wrap-main"> | |
Main | |
</div> | |
<footer class="wrap-footer"> | |
<div class="grid-wrapper"> | |
Footer | |
</div> | |
</footer> | |
</div> |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
// LAYOUT FOOTER POSITIONING | |
html, | |
body { | |
margin: 0; | |
padding: 0; | |
height: 100%; | |
} | |
.wrap { | |
min-height: 100%; | |
position: relative; | |
} | |
.wrap-main { | |
min-height: 40em; | |
overflow: hidden; | |
padding-bottom: 6em; /* Height of the footer */ | |
} | |
.wrap-footer { | |
background-color: #71716C; | |
bottom: 0; | |
height: 6em; /* Height of the footer */ | |
width: 100%; | |
position: absolute; | |
} |
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
html, | |
body { | |
margin: 0; | |
padding: 0; | |
height: 100%; | |
} | |
.wrap { | |
min-height: 100%; | |
position: relative; | |
} | |
.wrap-main { | |
min-height: 40em; | |
overflow: hidden; | |
padding-bottom: 6em; | |
/* Height of the footer */ | |
} | |
.wrap-footer { | |
background-color: #71716C; | |
bottom: 0; | |
height: 6em; | |
/* Height of the footer */ | |
width: 100%; | |
position: absolute; | |
} |
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="wrap"> | |
<div class="wrap-main"> | |
Main | |
</div> | |
<footer class="wrap-footer"> | |
<div class="grid-wrapper"> | |
Footer | |
</div> | |
</footer> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment