Created
November 24, 2014 09:37
-
-
Save jquerygeek/20dd5a288e8db0ef6ac2 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<div class='example'> | |
<div id='wrapper'> | |
<header> | |
<h1>Sticky Footer Example</h1> | |
</header> | |
<p> | |
This is the main content area. | |
</p> | |
<p> | |
In this example you should pretend that the red box | |
is actually the browser window. | |
</p> | |
<p> | |
Because, being a contrived example, it's not actually sticking | |
to the bottom of the page. | |
</p> | |
<div id='footer_push'></div> | |
</div> | |
<footer> | |
This is the footer area. | |
</footer> | |
</div> |
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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
@import "compass/layout/sticky-footer"; | |
@include sticky-footer(50px, "#wrapper", "#footer_push", "footer"); | |
header { | |
background: #999999; | |
height: 72px; | |
} | |
footer { | |
background: #cccccc; | |
} | |
.example { | |
height: 700px; | |
p { | |
margin: 1em 0.5em; | |
} | |
} |
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
html, body { | |
height: 100%; | |
} | |
#wrapper { | |
clear: both; | |
min-height: 100%; | |
height: auto !important; | |
height: 100%; | |
margin-bottom: -50px; | |
} | |
#wrapper #footer_push { | |
height: 50px; | |
} | |
footer { | |
clear: both; | |
position: relative; | |
height: 50px; | |
} | |
header { | |
background: #999999; | |
height: 72px; | |
} | |
footer { | |
background: #cccccc; | |
} | |
.example { | |
height: 700px; | |
} | |
.example p { | |
margin: 1em 0.5em; | |
} |
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
<div class='example'> | |
<div id='wrapper'> | |
<header> | |
<h1>Sticky Footer Example</h1> | |
</header> | |
<p> | |
This is the main content area. | |
</p> | |
<p> | |
In this example you should pretend that the red box | |
is actually the browser window. | |
</p> | |
<p> | |
Because, being a contrived example, it's not actually sticking | |
to the bottom of the page. | |
</p> | |
<div id='footer_push'></div> | |
</div> | |
<footer> | |
This is the footer area. | |
</footer> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment