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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:29:47+00:00 2026-06-05T20:29:47+00:00

I am using $(.container).height($(document).height()); to set my container 100% height but I was wanting

  • 0

I am using $(".container").height($(document).height()); to set my container 100% height but I was wanting to know is there a way to adapt the above line so that it places my footer at the bottom?

I am trying to work this in with TBS

  • 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-05T20:29:48+00:00Added an answer on June 5, 2026 at 8:29 pm

    The trick is to get the footer to stick to the bottom is creating a .wrapper class to contain your main content area, thus separating both main container and footer. Something like this:

    HTML

    <div class="navbar navbar-fixed-top">
      ... fixed navbar ...
    </div>
    
    <div class="wrapper">
        <div class="container">
          ... main content area ...
        </div> <!-- /container -->
    </div>
    
    <footer class="container">
        <div class="row">
            ... footer area ...
        </div>
    </footer>
    

    This way we can then use the .wrapper class to push the footer down however we want it too with CSS, and we do this by using the Ryan Fait Sticky Footer approach. In the case of the bootstrap, in order to to fit the top fixed navbar we have to first push the main container down instead of the body, per the bootstrap default settings. So we do this:

    CSS

    .wrapper > .container {
        padding-top: 60px;
    }
    

    This way we can fit the top navbar nicely in place. Afterwards we just give our footer a height and then eliminate that same width with a negative margin from the .wrapper container like so:

    .wrapper {
        min-height: 100%;
        height: auto !important; /* ie7 fix */
        height: 100%;
        margin: 0 auto -40px;
    }
    
    footer {
        height: 40px;
    }
    

    Keep in mind though that the footers height has to match exactly what you’re removing from the .wrapper container, thusly if you add any extra margin or padding or a border to the footer you have to compensate with the negative margin added to the .wrapper container accordingly.

    In order to extend this approach to support the bootstrap responsive stylesheet, i have added the following media queries: (they are inline with the fixed navbar)

    @media (max-width: 979px) {
        .wrapper > .container {
            padding-top:0;
        }
    
       .wrapper {
            height:auto;
            margin:auto;
            min-height:0;
       }
    }
    

    Here is a short demo with this approach, this method should work for both the fluid and fixed container from the bootstrap.

    Demo, edit here.

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

Sidebar

Related Questions

What is the best way to transparently inject dependencies (using IOC container) to user
I've recently started using an IoC container for the first time, but I'm not
The following is a C++ program using STL vector container. Just wanted to know
It was recommended to me that, when using an IOC container, I should change
i'm trying to insert an image in a div container using css and html,
How do we inject IRegionManager in the ViewModel using MEF Container. I have to
I have a table of frequently updated information. This is presented using a container
I am using Ajax tab container control with 3 tabs. I have placed a
On a portal's main page, I'm using a jQuery container plug-in, and by this
I'm trying to do something that I think should be pretty straightforward but I

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.