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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:50:06+00:00 2026-05-25T06:50:06+00:00

I am designing a master page. The layout is very simple.But height adjustment does

  • 0

I am designing a master page. The layout is very simple.But height adjustment does not work for me. The layout is:

<html>
<head>  
</head>
<body>
<div id='container'>
<div id='top'></div>
<div id='middle'></div>
<div id='bottom'></div>
</div>
</body>
</html>

What I want to achieve is

  1. ‘Container’ minimum height should be 100% and it should expand when the content is more than the height.
  2. height of the ‘top’ div should be 100px – fixed height.
  3. height of the ‘bottom’ should be 50px – fixed height and
  4. the remaining height(space) should be distributed to ‘middle’ div.

In short, whatever the height of the screen is header should be at the top with fixed height and footer should be at the bottom with fixed height. When the content exceeds the height of the ‘middle’ div then it should expand only with browser scrool bar without additional scroll bar.

I used the following css but it does not work.

html, body {width:99%;   height:98%;  font-family: "Trebuchet MS", Verdana, Helvetica, Sans-Serif; font-size:12px;}
#container {width:990px; height:100%; margin:0px auto 0px auto;}
#top       {width:990px; height:100px;}
#middle    {width:990px; min-height:100%;  border:1px solid #336699; overflow:auto}
#bottom    {width:990px; height:50px;}

Note: I am going to use this in ASP.NET MVC pages.

  • 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-25T06:50:06+00:00Added an answer on May 25, 2026 at 6:50 am

    Try this:

    html,body {
        margin:0;
        padding:0;
        height:100%; /* needed for container min-height */
    }
    
    div#container {
        position:relative; /* needed for footer positioning*/
        margin:0 auto; /* center, not in IE5 */
    
        height:auto !important; /* real browsers */
        height:100%; /* IE6 */
    
        min-height:100%; /* real browsers */
    }
    
    div#top {
        padding:1em;
    }
    
    div#middle {
        padding:1em 1em 5em; /* bottom padding for footer */
    }
    
    div#bottom {
        position:absolute;
        width:100%;
        bottom:0; /* stick to bottom */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a silverlight telerik RadComboBox. I am designing a master detail page. In
I am designing database tables for a master-detail scenario. The specific requirement is that
Designing forms has always been fun, but getting them to send email on the
When designing a collection class, is there any reason not to implement locking privately
I have a _ViewStart defining the master layout for my project (header, footer). In
I have rendering a section in the bottom master layout. This is typically section
Scenario: I have a pretty standard master page for all my pages. It includes
i've actually never encounter this problem before. I usually start designing my layout in
I am designing a page which needs to have boxes (partial views) on both
I am currently designing a master detail gridview. I have two separate objects defined

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.