Home › Forums › CSS › sticky footer? › Re: sticky footer?
I had this problem recently: a website with a lot of content on a some pages, next to none on others. I tried every solution I could find on-line. I could get the footer to stick to the bottom of the screen, no problem, but on pages with a lot of content that meant it appeared in the middle of the page (!). Furthermore, since these solutions used absolute positioning, on those pages the content scrolled but the footer remained fixed. Hardly what I was hoping to do.
In the end I found a solution that worked: on those pages with just a bit of content I added the "sticky CSS code" to the footer div in the HTML of the page, like this:
and on those pages, the footer appears at the bottom of the screen. On all other pages it appears on the bottom of the page. You can check it out here: http://www.mindmadebooks.com/.