Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8735157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:59:17+00:00 2026-06-13T09:59:17+00:00

I’m trying to do a footer the shows behind the content when scrolling towards

  • 0

I’m trying to do a footer the shows behind the content when scrolling towards the end of the website, it’s hard to explain so I did this gif

http://imageshack.us/f/687/newdw.gif/

I’ve tried to search around the web for tutorials and what I find is not what I’m looking for (all I’ve seen is slide up and slide down footer).

Would help a lot, if you can point me to a tutorial or explain how to do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:59:18+00:00Added an answer on June 13, 2026 at 9:59 am

    The following should do what you want, using only css.

    http://jsfiddle.net/zVLrb/

    This solution relies on the way elements with position:fixed behave. This code will mean that on shorter pages – i.e. ones that do not cause a scroll bar to appear, the footer will remain fixed to the bottom of the page, rather than the content.

    Basically the footer is always attached to the bottom of the window/viewport, as the user scrolls, but for the majority of the time you can’t see it because the rest of the page is floating above it – this is caused by using a higher z-index for the page content than the footer. By using a bottom margin the same height as the footer, we allow a space for the footer to appear, but only at the bottom of the page. 🙂

    This should work fine for all modern browsers, however you should test in IE7 just to make sure (as I don’t have that to hand right now).

    css

    .rest {
        position: relative;
        z-index: 100;
        background: #fff;
        margin-bottom: 200px;
        overflow: hidden;
    }
    
    .footer {
        height: 200px;
        width: 100%;
        background: #000;
        position: fixed;
        bottom: 0;
        z-index: -1;
        color: white;
        text-align: center;
        font-size: 20pt;
    }
    
    .footer p {
        margin-top: 50px;
    }
    

    markup

    <div class="rest">
      <p>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut feugiat
        euismod urna, eget interdum eros elementum in. Morbi dictum molestie
        porta. Morbi eget consectetur nibh. Etiam sed arcu ac elit dignissim
        consequat.
      </p>
      <!-- obviously this content would need to go on for longer to 
           cause the page to scroll //-->
    </p>
    </div>
    <div class="footer">
        <p>This is the footer</p>
    </div>
    

    update

    I can’t quite remember but I think with older Internet Explorer a negative z-index might put the footer below the body layer.. (meaning it wont be visible at all) so it may be best to use z-index:2 for .rest and z-index:1 for the footer. I wont have a chance to test that for a bit, but will update when I can.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.