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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:13:36+00:00 2026-05-25T16:13:36+00:00

I have been told to use JS to resolve my issue: My issue is

  • 0

I have been told to use JS to resolve my issue:

My issue is that I have 2 divs content and sidebar with the height set to 100%, I have a footer located underneath.

My issue is that on my laptop I would like the page to show without a scroll and on a full page3, if there is more data the page will then require a scroll.

How could I set the div height determined to my screen resolution?

  • 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-25T16:13:36+00:00Added an answer on May 25, 2026 at 4:13 pm

    You can do this in pure HTML/CSS – no JavaScript required.

    What you’re after is a cross-browser sticky footer.

    The following is derived from 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 have previously been told that I should always use Randomize() before I use
I noticed that a new collection that I have been told to use at
I have been told recently that extending the Application Class in order to use
I have been told that there is a way to use aapt's --version-code option
We have been told that we have to use a piece of software called
I have been told that I can use the opengraph, and other FB/Twitter protocols
I have been told to not use sudo so that the package concerned get
i have been told to use 'when' statement to make multiplexer but not use
I have been told that Eclipse is a good tool for programming in certain
I am building a web application and have been told that using object oriented

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.