Streaming live at 10am (PST)

How to get footer to stick to the bottom of the page or (sticky-footer)?


#1

Hello, I am trying to figure out why my footer is sticking to bottom on some pages (like it should) and why its not sticking on other parent pages? Is it possible that its not sticking because theres not enough content on those pages for it to display as a full page with footer at bottom? Thank you in advance for your help/suggestions as I am kind of confused by this.


Here is my public share link: LINK
(how to access public share link)


#2

Could you please update your post with some more information so we can help you faster? Things like your read-only link & screenshots really helps us to help you faster :slightly_smiling:

How to share a read-only link:
http://help.webflow.com/faq/how-do-i-share-my-sites-read-only-link

Thanks in advance! :slightly_smiling:

Sounds like there just needs to be additional content on the page to make sure that the footer is pushed all the way to the bottom of the browser window :wink:


#3

The public share link isn't working.


#4

Hi @gschultz. I found a code snippet in this topic: http://forum.webflow.com/t/how-can-i-force-a-footer-to-appear-at-the-bottom-of-the-visible-window/465 that might help you make sure the footer sticks to the bottom of the browser window even if you don't have enough content on the page. The code is from @bart
Place the following in custom code (footer code):

<script>
$(document).ready(function() {
/* vp_h will hold the height of the browser window */
var vp_h = $(window).height();
/* b_g will hold the height of the html body */
var b_g = $('body').height();
/* If the body height is lower than window */
if(b_g < vp_h) {
/* Set the footer css -> position: absolute; */
$('.footer').css("position","absolute");
}
});
</script>

Make sure the container or div that holds your footer elements is named footer, publish your site and see if it works.


#5

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.