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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:05:18+00:00 2026-06-11T01:05:18+00:00

If got a very basic layout, with a header, content container and a footer.

  • 0

If got a very basic layout, with a header, content container and a footer.
What i need done, is to make my content container size up, so that the whole layout will fit on the screen. (unless the text in the content container extends this of course).

I’ve tried assigning a height 100% value to my body, and from there assigning my content containers height to 100% aswell, but that results in making my content container size up to the height of the full screen.

Before that i had the height on the content container set to auto, which of course resulted in the page not being long enough, if a visitor with a bigger screen size than the layout, viewed the page.

Here is a part of my code:

HTML:

<body>
    <div class="background"></div>
        <div class="page">
            <div class="header">
            </div>

            <div class="content">
            </div>

            <div class="footer">
            </div>
        </div>
</body>

CSS:

html, body {
    height:100%; 
    margin:0; 
    padding:0;
}
.page {
    position:relative; 
    height:100%;
    z-index:1; 
}
.content {
    position:relative;
    width:850px;
    height: 100%;
    margin: 0 auto;
    background: url(images/content.png) 0 0 repeat-y;
}
  • 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-11T01:05:19+00:00Added an answer on June 11, 2026 at 1:05 am

    I think this what you need (the footer will be always sticked to the bottom)

    CSS

    html, body {
        margin:0;
        padding:0;
        height:100%;
    }
    .page {
        min-height:100%;
        position:relative;
    }
    .header {
        background:#00ff0f;
        padding:30px;
    }
    .content{
        padding:10px;
        padding-bottom:45px;   /* Height+padding(top and botton) of the footer */
        text-align:justify; 
     }
    .footer {
        position:absolute;
        bottom:0;
        width:100%;
        height:15px;   /* Height of the footer */
        background:#00ff0f;
        padding:10px 0; /*paddingtop+bottom 20*/
    }
    
    .content {
        height:100%; // IE HACK
    }
    

    HTML

    <div class="page">
        <div class="header">Header</div>
        <div class="content">
            Some Content Here...
        </div>
        <div class="footer">Footer</div>
    </div>​
    

    Tested in all major browsers.
    DEMO.

    ​

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

Sidebar

Related Questions

We've got an application planned that is a very basic 7 page presetation. Our
I've got a very basic application that boils down to the following code: char*
I got an very basic test.asp page that needs to run on a 64-bit
I've got a very basic object object model that is being serialized by the
I've got a testimonial plugin that rotates. On a very basic level here is
A very basic setup: title-shim-container . The shim ensures, that on page load, the
I've got some basic Java experience and very basic Android app development experience (currently
Very basic question - but I couldn't find an answer. I have got a
I've got a very large table (~100Million Records) in MySQL that contains information about
I've got some very basic code like while (scan.hasNextLine()) { String temp = scan.nextLine();

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.