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

  • Home
  • SEARCH
  • 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 6596213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:02:44+00:00 2026-05-25T18:02:44+00:00

Trying to implement sticky footer but its not working as planned. It throws it

  • 0

Trying to implement “sticky” footer but its not working as planned. It throws it at the bottom and on first scroll it works as supposed to (except that it shows an inner-scroll bar). When scrolling back up, the stick footer doesn’t disappear right away, it takes a few scrolls then it seems to go back to the “bottom”. So my question is how do I keep the footer at the bottom at all times and eliminate the inner scroll bar. I am wondering if my absolute positioning is problematic on the main-content-inner. That div is expandable in height.

Problem Screenshot

Here is the code:

<div id="page-wrap">
  <div id="main-content>
    <div id="main-content-inner></div>
  </div>
  <div class="footerpush"></div>
</div>
<div id="footer">copyright info</div>


#page-wrap {
width:100%;
min-height:100%;
height:auto;
height:100%;
margin-bottom:-20px;
position:relative;
overflow:auto;

}
#main-content {
width: 100%;
height:100%;
margin-left: -295px;
position:relative;
}
#main-content-inner {
left: 560px;
border-radius:8px;
border-style:solid;
border-width:2px;
border-color:#53D8FF;
padding:20px;
padding-bottom:0;
background-color:#000000;
position:absolute;
top:100px;
min-width:60%;
max-width:60%;
}
#footer {

text-align: right;
padding-top: 20px;
padding-bottom: 20px;
padding-right: 20px;
color: #A7A9AC;
font-size: 12px;
height:20px;

}

.footerpush
{
height:20px;
}

If I remove overflow auto from page-wrap, the footer actually moves to the bottom of my page-wrap div. So it appears that because of my absolute main-content-inner being absolute, it is expanding outside of my wrapper? If I set a fixed value on the height of page-wrap, the footer moves to the bottom as it should. So this is the real question, how do I keep my footer at the bottom of the page even with expandable content?

Further research shows that when i set overflow to hidden on page wrap, that my absolute content “main-content-inner” gets cut off. How do I get the height of page-wrap expand to the height of main-content-inner, no matter what it is?

  • 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-05-25T18:02:44+00:00Added an answer on May 25, 2026 at 6:02 pm

    As I answered here, you can use http://www.cssstickyfooter.com/:

    <!DOCTYPE html>
    <html>
        <head>
            <style type="text/css">
                html, body {
                    height: 100%;
                    padding: 0;
                }
    
                #wrap {
                    min-height: 100%;
                }
    
                #main {
                    overflow:auto;
                    padding-bottom: 150px; /* must be same height as the footer */
                }
    
                #footer {
                    position: relative;
                    margin-top: -150px; /* negative value of footer height */
                    height: 150px;
                    clear:both;
                } 
    
                /*Opera Fix*/
                body:before {
                    content:"";
                    height:100%;
                    float:left;
                    width:0;
                    margin-top:-32767px;/
                }
            </style>
            <!--[if !IE 7]>
            <style type="text/css">
                #wrap {display:table;height:100%}
            </style>
            <![endif]-->
        </head>
        <body>
            <div id="wrap">
                <div id="main">
                    <div id="content">
                        <!-- Main content here -->
                    </div>
                </div>
            </div>
            <div id="footer">
                <!-- Footer content here -->
            </div>
        </body>
    </html>
    

    You can see a working example here: http://jsfiddle.net/dZDUR/

    Resize the right-hand “Result” pane to be shorter/taller than the text
    to see the scroll bar appear / disappear.

    As per the CSS Sticky Footer how-to, you can insert your normal
    ‘column’ layout inside the main div.

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

Sidebar

Related Questions

I'm trying to implement a sticky footer which is working except that the main
I am trying to implement the CSS sticky footer on the following page: http://www.tuhdoo.com/test/index.htm
I'm trying implement my project in Apache Struts 2 but I'm not very familiar
I am trying to implement a CSS sticky footer. The issue is there is
Im trying to implement pagination using multiple searching criteria. Supposed I Have student table.
am trying to implement fluent nhibernate in MVC project...there were no build errors... but
I am trying to implement some AI planning algorithms in C, but got stuck
I am trying to implement one of the first examples from boost::random documentation in
I'm trying implement pull to refresh on a ListFragment but right now none of
All I am currently trying implement something along the lines of dim l_stuff as

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.