Questions tagged [sticky-footer]

Sticky Footer is a CSS technique used to anchor the footer section to the bottom of the page, regardless of the page's height. When the page height is less than the viewport, the Sticky Footer will be at the bottom of the viewport, and when the page height is longer than the viewport, the Sticky Footer will be at the bottom of the page.

Here's the canonical Sticky Footer Implementation:
http://ryanfait.com/html5-sticky-footer/

Here's a bare bones example:

<html>
    <head>
        <link rel="stylesheet" href="layout.css" ... />
    </head>
    <body>
        <div class="wrapper">
            <p>Your website content here.</p>
            <div class="push"></div>
        </div>
        <div class="footer">
            <p>Copyright (c) 2008</p>
        </div>
    </body>
</html>
* {
  margin: 0;
}
html, body {
  height: 100%;
}
.wrapper {
  min-height: 100%;
  height: auto !important;
  height: 100%;
  margin: 0 auto -4em;
}
.footer, .push {
  height: 4em;
}

.footer {
  background: yellow;
}

Simple Demo in Plunker

screenshot

754 questions
8
votes
4 answers

How create a TRUE sticky header/ footer using Tailwindcss (sticks to bottom even if scroll)?

Lot of blogs and posts purport to create a "sticky footer" using Tailwindcss, but none that I can find thought about the case where there is more than a short "hello world" line of content: For example in none of these examples does the footer…
jpw
  • 18,697
  • 25
  • 111
  • 187
8
votes
2 answers

Responsive Bootstrap Sticky Footer Height

When the window is resized, the height of the footer expands but not the background color. Help! http://twitter.github.io/bootstrap/examples/sticky-footer.html
AlGallaf
  • 627
  • 6
  • 15
  • 28
8
votes
5 answers

Footer to animate in on scroll

I currently have the footer appearing once the page has scrolled past a set point but would like to make it reveal as the user scrolls instead of just appearing on screen (as it currently does). Would be interested to know if it can be achieved with…
Rob
  • 1,493
  • 5
  • 30
  • 58
7
votes
1 answer

Keep footer at bottom of page when page height dynamically changes using CSS

There are a lot of topics out there, giving solutions to keep the footer at the bottom of a page. However, I am struggling to get it working. The problem is that the page can dynamically change its height. With the current solution I'm using, the…
Red
  • 6,599
  • 9
  • 43
  • 85
7
votes
4 answers

Keep the footer at the bottom with Javascript

At the moment I'm trying to keep the footer at the bottom with Javascript. This is the result: document.getElementsByTagName('body').onload = function() {KeepFoot()}; var element = document.getElementById('container'); var height =…
Keaire
  • 879
  • 1
  • 11
  • 30
7
votes
4 answers

A true sticky footer with a fixed header?

First of all, please read this whole question so you can fully understand what i am looking for, Thanks! This is a question i have been trying to research for a great time now, and has stumped me for quit a while. Can i have a true sticky footer…
Hunter Mitchell
  • 7,063
  • 18
  • 69
  • 116
6
votes
4 answers

Sticky footer, or rather: content doesn't stretch down to footer

So I wanted a sticky footer on a page and got this one to work for me. All is well, but no, not really.. The problem is that I wanted the content above the footer to stretch all the way down to it. Now the box containing the main content end just…
stinaq
  • 1,274
  • 3
  • 19
  • 31
6
votes
8 answers

div aside with position absolute and sticky footer

I'm in trouble with the following html layout. I know that there are other questions about absolute positioning and sticky footer, I tried a lot of solutions but I didn't make this work, so I tried to post the whole layout html code to see if…
user1037656
6
votes
2 answers

Fixed footer bar - Android HTML5 Phonegap app?

Can anyone recommend the best method to create a fixed (sticky footer) footer nav bar within a HTML5 Android Phonegap app? Cheers Paul
Dancer
  • 17,035
  • 38
  • 129
  • 206
6
votes
4 answers

background content image needs to stick to bottom

I'm trying to push my background content image and make it stick to bottom of my page. The image is NOT a footer since the image will be behind some of the content. But the image shouldn't get cut off at the top when there is little content and and…
Andrew
  • 61
  • 1
  • 2
6
votes
6 answers

CSS sticky footer | Footer without a fixed height

I have implemented the sticky footer many times from http://www.cssstickyfooter.com/. The only problem is that the footer has a fixed height. Is there a pure CSS solution to allow the footer to grow based on the content inside? A JS solution…
Tom Wahlin
  • 137
  • 1
  • 10
6
votes
4 answers

Angular 2 sticky footer impementation

I want my footer to be a sticky footer and tried following the css tricks negative margin trick, but did not work. I tried to impersonate my angular2 app in the below plunker code. I want the sticker not be fixed but sticky and go to the bottom when…
John Jai
  • 3,463
  • 6
  • 25
  • 32
6
votes
1 answer

Footer interrupting opacity transition effect CSS

I am having two issues with my footer element: 1) I managed to finally make it stick to the bottom of every page, but, 2) once I did that, my opacity transition effect inside div class=sectionalblock refuses to work. If I get rid of my footer, then…
sarangheh510
  • 71
  • 1
  • 6
6
votes
4 answers

Links in footer unclickable (bottom-fixed and behind content) when overflow-x is hidden for html and body

Situation: Given the following simplified HTML example: put a footer behind content, make it bottom-sticky when scrolling to the end of page: footer shall unravel from behind content I was able to do this but when I have html and body both set…
xmoex
  • 2,602
  • 22
  • 36
6
votes
1 answer

Footer with absolute position does not stick on scroll

I am trying to do a footer that will stick to the bottom of the page instead I am getting it stuck to bottom position for the original window. When I scroll I end up having the footer stick in the middle of the page. I am not trying to have it fixed…
Sam Sedighian
  • 885
  • 1
  • 7
  • 21
1 2
3
50 51