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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:45:27+00:00 2026-06-04T01:45:27+00:00

I want #main to be 100%, but not affected by #upper — pushed down

  • 0

I want #main to be 100%, but not affected by #upper — pushed down by 39px and making the page scrollable. Overflow: hidden on body won’t do it for me, since I need to see content at the bottom. How do I fix this? Something similar to sticky footer, or? I don’t seem to understand it.

<body>
<div id="upper"></div>
<div id="main">
    <div id="box"></div>    
</div>
</body>

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: 100%;
}
#upper {
    height: 39px;
    width: 100%;
    background: #212121;
}
#main {
    display: block;
    width: 100%;    
    min-height: 100%;
    margin: 0 auto;
    background: blue;
}

Picture of how it looks http://i46.tinypic.com/25k1jcn.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-06-04T01:45:29+00:00Added an answer on June 4, 2026 at 1:45 am

    An alternative to @Zoltan’s answer:

    html, body {
      margin: 0;
      padding: 0;
      min-height: 100%;
      height: 100%;
    }
    #upper {
      height: 39px;
      width: 100%;
      background: #212121;
      position: fixed;
      top: 0;
      left: 0;
    }
    #main {
      display: block;
      width: 100%;    
      margin: 0 auto;
      background: lightblue;
      position: fixed;
      top: 39px;
      bottom: 0;
    }
    <div id="upper"></div>
    <div id="main">
      <div id="box">Hi</div>    
    </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 do blog application and I want main page to have this
I want to read a value from textfied in Java but I am not
I'm pretty sure this is 100% safe, but I don't want to miss anything.
I want to invoke the main method which is static. I got the object
I want to know the main difference between .live() vs. .bind() methods in jQuery.
I want to change out my previous main form for a new one. According
I want to run the constructor of the Main.class in the package Test2, located
I want to redirect visitors to my main domain when they perform requests on
I want to create an application which main window has canvas (or something where
I want to use variable a from foo.c in main.c, and I write: foo.c

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.