Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   Sticky Footer (http://forum.bytesforall.com/showthread.php?t=2259)

krystyna Jul 4, 2009 11:24 PM

Sticky Footer
 
As you can see by my design, I need a sticky footer:

*url removed*

Only one problem: I can't figure out how to make it stick. Any ideas, anyone? :confused:

Flynn Jul 12, 2009 05:21 AM

Add this:

/* First, set a compensation value to fix browser differences and an overall
misalignment with this method */
if (jQuery.browser.msie || jQuery.browser.safari) {
var bfacompensate = 41;
} else {
var bfacompensate = 21;
}

/* Then, fix a jQuery/Opera 9.5+ bug with determining the window height */
var windowheight = jQuery.browser.opera && jQuery.browser.version > "9.5" &&
jQuery.fn.jquery <= "1.2.6" ? document.documentElement["clientHeight"] : jQuery(window).height();

/* Top and bottom padding may have been set on the BODY */
var paddingtop = parseInt(jQuery("body").css("padding-top"));
var paddingbottom = parseInt(jQuery("body").css("padding-bottom"));

/* Get the height of the header, footer, and the layout as a whole */
var headerheight = jQuery("td#header").height();
var footerheight = jQuery("td#footer").height();
var layoutheight = jQuery("div#wrapper").height();

/* Adjust height of middle column if (layout height + body padding-top + body padding-bottom) is smaller than
height of browser viewport */
if ( windowheight > (layoutheight + paddingtop + paddingbottom) ) {
var newmiddleheight = windowheight - paddingtop - headerheight - footerheight - paddingbottom - bfacompensate;
jQuery("td#middle").css({height: newmiddleheight + "px"});
}

in js.php, right after:

/* strech short pages to full height, keep footer at bottom */


This will be a theme option in 3.4.2


All times are GMT -6. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.