Created
November 9, 2011 22:05
-
-
Save zachbrowne/1353253 to your computer and use it in GitHub Desktop.
Sticky Footers for Thesis Theme on WordPress
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, .custom { | |
height: 100%; | |
} | |
.custom .wrapper { | |
min-height: 100%; | |
height: auto !important; | |
height: 100%; | |
margin: 0 auto -100px; /* the bottom margin is the negative value of the footer's height */ | |
} | |
.custom #footer_area, .custom .push { | |
height: 100px; /* .push must be the same height as .footer */ | |
} |
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
// sticky footer | |
function div_push() { | |
?> | |
<div class="push"></div> | |
<?php | |
} | |
function div_wrapper_start() { | |
?> | |
<div class="wrapper"> | |
<?php | |
} | |
function div_wrapper_close() { | |
?> | |
</div><!--end wrapper--> | |
<?php | |
} | |
add_action('thesis_hook_after_content_area', 'div_push'); | |
add_action('thesis_hook_before_html', 'div_wrapper_start'); | |
add_action('thesis_hook_after_content_area', 'div_wrapper_close'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment