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 267775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:36:12+00:00 2026-05-11T23:36:12+00:00

Im having some problems getting the Sticky Footer to work on my site. If

  • 0

Im having some problems getting the Sticky Footer to work on my site. If the content is smaller than the window the footer should stay at the bottom of the window and the dead space should be filled up with a div. I think the CSS Sticky Footer does this, but I cant get the “push div” to work push the content all the way down. As you can see my code isn’t just body-wrapper-footer.

<body>
  <div id="banner-bg">
    <div id="wrapper">
      <div id="header-bg">
        <!-- header stuff -->
      </div> <!-- end header-bg -->
      <div id="content-bg">
        <div id="content">
          <!-- content stuff -->
        </div> <!-- end content -->
      </div> <!-- end content-bg -->
    </div> <!-- end wrapper -->
  </div> <!-- end banner-bg -->
</body>

body { 
    color:              #00FFFF;
    background-image:   url("Images/img.gif");
    font-size:          1em;
    font-weight:        normal;
    font-family:        verdana;
    text-align:         center;
    padding:            0;
    margin:             0;
}

#banner-bg {
    width:              100%;
    height:             9em;
    background-image:   url("Images/img2.gif"); background-repeat: repeat-x;
    position: absolute; top: 0;
}

#wrapper {
    width:              84em;
    margin-left:        auto; 
    margin-right:       auto;
}

#header-bg {
    height:             16em;
    background-image:   url("Images/header/header-bg.png"); 
}

#content-bg {
    background-image:   url("Images/img3.png"); background-repeat: repeat-y;
}

#content {
    margin-right:       2em; 
    margin-left:        2em;
}

Im confused about where the CSS Sticky Footer-code should go in my case.

Edit, heres what I got and what I want to do:
alt text http://bayimg.com/image/gacniaacf.jpg

  • 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-11T23:36:12+00:00Added an answer on May 11, 2026 at 11:36 pm

    Your HTML is a tad strange. For example, why does banner-bg wrap around everything?

    That said, in order to use Sticky Footer technique you need to wrap everything but the footer into a single DIV. So your <body> tag would only contain two top DIVs – wrapper and footer. All the stuff you currently have would go inside that wrapper DIV.

    Note that Sticky Footer may not work for you if background images you’re using include transparent areas as it relies on wrapper background being covered by the header.

    Update: Ok, here’s the version that works. “Sticky Footer” style sheet is taken from cssstickyfooter.com and should work in all modern browsers. I’ve streamlined your HTML a bit (there’s no need for separate background layers based on your picture) but you can modify it as you like so long as you keep the basic structure in place. Also, since I don’t have your images I’ve added solid background colors for illustration purposes, you’ll need to remove them.

    <html>
    <head>
     <style>
    * {margin: 0; padding: 0} 
    html, body, #wrap {height: 100%}
    body > #wrap {height: auto; min-height: 100%}
    #main {padding-bottom: 100px}  /* must be same height as the footer */
    #footer {position: relative;
      margin-top: -100px; /* negative value of footer height */
        height: 100px;
        clear:both;
    }
    /* CLEAR FIX*/
    .clearfix:after {content: "."; display: block; height: 0;   clear: both; visibility: hidden}
    .clearfix {display: inline-block}
    /* Hides from IE-mac \*/
    * html .clearfix { height: 1%}
    .clearfix {display: block}
    /* End hide from IE-mac */ 
    
    /* Do not touch styles above - see http://www.cssstickyfooter.com */
    
    body {
      background-image: url("Images/img.gif");
      background: #99CCFF;
      color: #FFF;
      font-size: 13px;
      font-weight: normal;
      font-family: verdana;
      text-align: center;
      overflow: auto;
    }
    
    div#banner {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 9em;
      background: url("Images/img2.gif") repeat-x;
      background: #000;
    }
    
    div#wrap {
      background: #666;
      width: 84em;
      margin-left: auto;
      margin-right: auto;
    }
    
    div#header {
      height: 16em;
      padding-top: 9em; /* banner height */
      background: url("Images/header/header-bg.png");
      background: #333; 
    }
    
    div#footer {
      background: #000;
      width: 84em;
      margin-left: auto;
      margin-right: auto;
    }
    
     </style>
    </head>
    <body>
     <div id="banner">Banner</div>
     <div id="wrap">
        <div id="main" class="clearfix">
         <div id="header">Header</div> 
         <div id="content">
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content<br />
         Content
       </div> <!-- end content -->
        </div> <!-- end main -->
     </div>
     <div id="footer">
      Footer
     </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some problems with getting the .getruntime.exec() to work properly. Here is the
Hello i am having some problems sending mails thoug my site. I keep getting
Having some problems getting JSTree to work with IE7 and 8. It works great
Having some problems with getting some ajax script to work. Using this as the
I am having some problems getting this layout to work properly in IE (both
Having some problems getting my cross server request to work in IE. Is it
I am having some problems in getting a loop to work. My goal is
I'm having some problems with getting multiple file upload to work. When I select
I'm having some problems getting my object to gracefully fail out if an invalid
I'm having some problems getting ncurses' getch() to block. Default operation seems to be

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.