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
16
votes
3 answers

How Do I Fix A Flexbox Sticky Footer In IE11

I have created a sticky footer using flexbox. It works in all browsers apart from IE11. Codepen html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } .Page { min-height: 100vh; display: flex; …
Undistraction
  • 42,754
  • 56
  • 195
  • 331
16
votes
1 answer

Why not used position:fixed for a "sticky" footer?

I've seen Ryan Fait's method for sticky footer as well as one here and here. Why are these people making templates for sticky footers when #footer{position:fixed; bottom:0;} will suffice? EDIT: I will add that using position: fixed; for a footer…
Moshe
  • 57,511
  • 78
  • 272
  • 425
12
votes
6 answers

How to make a sticky footer using CSS?

I want to keep my footer at the bottom of the page. I try this position: absolute; left: 0; bottom: 0; height: 100px; width: 100%; but my footer getting messy. My website is made in WordPress. If possible I don't want to use any plugin for this.…
indigo
  • 181
  • 1
  • 2
  • 13
12
votes
6 answers

How do I get a floating footer to stick to the bottom of the viewport in IE 6?

I know this would be easy with position:fixed, but unfortanately I'm stuck with supporting IE 6. How can I do this? I would rather use CSS to be clean, but if I have to use Javascript, that's not the end of the world. In my current implementation…
Bialecki
  • 30,061
  • 36
  • 87
  • 109
12
votes
6 answers

Keeping HTML footer at the bottom of the window if page is short

Some of my webpages are short. In those pages, the footer might end up in the middle of the window and below the footer is whitespace (in white). That looks ugly. I'd like the footer to be at the bottom of the window and the limited content body…
at.
  • 50,922
  • 104
  • 292
  • 461
11
votes
3 answers

Angular Material fixed toolbar AND sticky footer

I have been beating my head against this issue for some time now and sort of came up with a solution. I would like a fixed toolbar (navbar) as well as a sticky (floating) footer. The footer should float at the bottom of the main section but be…
Brian Baker
  • 986
  • 1
  • 6
  • 17
10
votes
2 answers

Sticky footer and content with 100% height

I want a page with sticky footer which's scrollbar does not overlap header, only body. Like I do in this fiddle. But now i want that content (dotted box) has 100% height of body. html
user3714967
  • 1,575
  • 3
  • 14
  • 29
10
votes
3 answers

UIScrollView with sticky footer UIView and dynamic height content

Challenge time! Imagine we have 2 content views: UIView with dynamically height content (expandable UITextView) = RED UIView as a footer = BLUE This content is inside a UIScrollView = GEEN How should I structure and handle the constraints with…
Gaston Morixe
  • 839
  • 2
  • 10
  • 21
10
votes
3 answers

Jquery Mobile Sticky Footer

I want a footer in Jquery Mobile, that is not fixed, but is always at the bottom of the page. Like this: http://ryanfait.com/sticky-footer/ (but in JQuery Mobile), not like like the standard JQuery Mobile Fixed footers. So the footer should appear…
JeffS
  • 2,647
  • 2
  • 19
  • 24
9
votes
3 answers

Forcing Footer Stay At The Bottom?

I have no containers, no wrappers. I simply have a layout like so...
What I am wanting to do is to make sure the…
Aaron Brewer
  • 3,567
  • 18
  • 48
  • 78
9
votes
3 answers

Android sticky - footer using jetpack compose: Align footer view to table, until it reaches screen size and then become fixed at the bottom

I want to achieve this using jetpack compose. A is scrollable list of row items. When A is smaller than screen(or parent) size, B(footer) should be placed bellow the last row. When A + B are bigger than screen size, then B becomes fixed at the…
9
votes
3 answers

Making footer image stick to bottom of web browser or page

I know this has been asked alot of times in the past but for the life of me I can't seem to get any of the other solutions to work. What I'm trying to do is to get the footer (which is an image that repeats across the width of the page) to stick to…
user268649
9
votes
4 answers

CSS footer doesn't stick to the bottom of the page

I'm having some difficulties in setting up a sticky footer in my css layout. I've been trying to go with the idea from http://www.cssstickyfooter.com/ but the footer doesn't stay at the bottom of the page if the content in the divs isn't high…
David
  • 93
  • 1
  • 1
  • 3
8
votes
2 answers

IOS can't click links in fixed footer until after scroll?

Possible Duplicate: Mobile Webkit reflow issue I have been trying to figure this out. I have a fixed footer on ios with 4 links in it. Their are also 6 links under it that should not be clickable since they are below. However on ios when unless…
busyPixels
  • 366
  • 1
  • 5
  • 18
8
votes
4 answers

How to have footer always at the bottom of page?

My page doesn't contain a lot of information, so footer is displayed somewhere in the middle of the page. How can I have that always at the bottom?
LA_
  • 19,823
  • 58
  • 172
  • 308
1
2
3
50 51