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
346
votes
32 answers

How do you get the footer to stay at the bottom of a Web page?

I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but…
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
81
votes
10 answers

CSS: fixed to bottom and centered

I need my footer to be fixed to the bottom of the page and to center it. The contents of the footer may change at all time so I can't just center it via margin-left: xxpx; margin-right: xxpx; The problem is that for some reason this doesn't…
CamelCamelCamel
  • 5,200
  • 8
  • 61
  • 93
75
votes
12 answers

How to create a sticky footer that plays well with Bootstrap 3

With or without a top nav, it is very common for sites to have a sticky footer. Bootstrap has a facility to easily create fixed footers, but no such facility for creating sticky footers - there is a big difference. Googling this question will…
Robert Christian
  • 18,218
  • 20
  • 74
  • 89
75
votes
16 answers

How to stick a footer to bottom in css?

I am having the classic problem for the positioning of a Footer on the bottom of the browser. I've tried methods including http://ryanfait.com/resources/footer-stick-to-bottom-of-page/ but to no good result: my footer always keeps appearing in the…
Amc_rtty
  • 3,662
  • 11
  • 48
  • 73
60
votes
6 answers

Bootstrap 4 Sticky Footer Not Sticking

Not really sure why the sticky footer isn't working in Bootstrap 4. I have a TYPO3 website which I am a beginner at. The sticky footer is not sticking at the bottom of the page. Here is a copy of the page source as it has been rendered. I…
Daryn
  • 1,551
  • 1
  • 15
  • 21
35
votes
7 answers

CSS Sticky Footers with Unknown Height

Is there any way to stick a footer to the bottom of the browser screen or right after the content (depending on which is longer) using CSS without knowing the size of the footer in advance? Right now I am using the absolute positioning in a…
Loyal Tingley
  • 910
  • 1
  • 8
  • 20
35
votes
5 answers

floating footer always on the bottom and visible

I have a website like this one: >> website <<. It is built from 2 frames - main and a footer. I was trying to get it working without frames (don't work on mobile phones). Is there any simple CSS or jQuery method to stick the footer on the bottom to…
Piotr Ciszewski
  • 1,691
  • 4
  • 30
  • 53
27
votes
6 answers

How to fix a footer overlapping content?

I've looked around for similar issues here and in other places, but I can't seem to find a definitive answer. When I add enough text to a page that it would get to the footer, the footer simply overlaps the text. Same thing if I reduce the size of…
Flawedspirit
  • 413
  • 1
  • 5
  • 9
26
votes
10 answers

How can I force my footer to stick to the bottom of any page in CSS?

This is my code: #footer { font-size: 10px; position:absolute; bottom:0; background:#ffffff; } I've no idea what is wrong with this - can anyone help? EDIT: For some more clarity on what's wrong: The footer is displayed on the bottom as…
oxo
  • 4,343
  • 10
  • 32
  • 35
24
votes
5 answers

How to stop Sticky Footer from covering content...?

I'm using a "sticky" footer, but on a couple of pages it overlays the content. Is there any way to prevent this from happening, but retaining it's "sticky" quality? I tried using min-height: on HTML and body, but that didn't work. CSS: html { …
pianoman
  • 815
  • 2
  • 16
  • 36
21
votes
6 answers

Position footer at bottom of page having fixed header

I want to position the footer at the bottom of the page which having a fixed header also... Not with position: fixed - I don't want it to remain on the screen, it should just be at the end of the page and behave normally when scrolling. Not at the…
Drahcir
  • 11,772
  • 24
  • 86
  • 128
20
votes
6 answers

HTML 5 Footer tag be always at bottom

I am developing a site in HTML 5. I wrap all my footer content in footer tag. Like code below

Talking Dogs

Humans aren't the only talkers!

Ever…

vaibought
  • 461
  • 2
  • 6
  • 20
19
votes
6 answers

Adding a footer that is always displayed at bottom of screen?

How can i add a footer that is always at the bottom of the screen even when the page contents are very small e.g of problem, lets say I have a page that doesn't have that much on display in it, the footer therefore becomes in the middle of the…
user646560
19
votes
3 answers

how to make DIV height 100% between header and footer

Is there a way to setup a layout so that the header is 50px, body is 100% and footer is 50px? I would like the body to use up the entire viewing area at minimum. I would like to have the footer and header to be on the screen at all times
Arcadian
  • 4,312
  • 12
  • 64
  • 107
17
votes
4 answers

Keeping footer at the bottom of window on site that scrolls horizontal

I've got a completely horizontal scrolling site, TopNav (fixed position) Nav (fixed position) Content (sideways scrolling) Footer (fixed position) Everything seems to be working great but the problem I have is that if the content is big enough to…
Brandon
  • 399
  • 2
  • 5
  • 18
1
2 3
50 51