By simply adding a footer div on the bottom of the content code ?
Problem: what if the content is smaller than the window ? The footer’s position will not be on the bottom of the page, it will be positioned right after the content.
By positioning the footer div as absolute with bottom:0 ?
Problem: What if the content is larger than the window ? Then the footer will lay on top of the content.
After much investigations concerning this issue, I would like to recommend two found solutions for this problem:
1. By using CSS: http://ryanfait.com/sticky-footer/
The the call to the setFooter() function looks like this:
This worked perfectly… except for one particular page and this behavior was only present in Firefox. This page binds asynchronously three gridviews in an Ajax postback after the page has already been initially loaded.
After the gridviews are bound, in IE the height is re-calculated and the footer is re-positioned correctly.
For some unknown reason, Firefox does not call setFooter() again after the gridviews are bound. This means that, after the gridviews are bound, in Firefox the calculated height above the footer is still the value from the initial loading. This results in having on the page, between the top content and the footer, a white space rendered, which was rendered actually on the initial page load as necessary because the gridviews were empty and not populated yet so the content was smaller than the window.
The solution? We have to call setFooter() after the page is loaded from an ajax postback, like this:
Perhaps this will save you precious time on the next occasion.