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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:58:56+00:00 2026-05-25T12:58:56+00:00

I made a centered page container that has 100% height with a footer inside

  • 0

I made a centered page container that has 100% height with a footer inside it. My problem is that when I put in an element that is too tall or text that is too long, they will flow out of the “#page” container and over the footer. Using overflow-y: auto; on “#page” container doesn’t look good. I would prefer the “#page” container to stretch to accommodate longer elements or text but still have the “#page” container’s height to be the same as the browser window height. An aesthetically pleasing solution would be appreciated thanks.

UPDATE:
here is the jsfiddle link http://jsfiddle.net/ueP9q/

  • 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-25T12:58:57+00:00Added an answer on May 25, 2026 at 12:58 pm

    HTML

    <div id="page">
        <div id="content">
                <div id="header1" class="header"></div>
                <div id="divider" class="header"></div>
                <div id="header2" class="header"></div>
         <p>asdasdadsads</p>
            <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
        <p>asdasdadsads</p>
    
        </div>
    
        <div id="footer">
            </div>
    </div>
    

    CSS

    *{margin:0px;padding:0px;}
    body,html{height:100%;}
    body{
    text-align: center;  
    padding:0px;
    margin:0px;
    }
    #page{
    margin: 0 auto;
    background:rgba(255,255,255,0.79);
    width:950px;
    -webkit-box-shadow: inset 1px 1px 150px 5px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: inset 1px 1px 150px 5px rgba(0, 0, 0, 0.2);
    box-shadow: inset 1px 1px 150px 5px rgba(0, 0, 0, 0.2);
    }
    #footer{
    border-top:1px solid white;
    border-bottom:1px solid white;
    width:950px;
    height:50px;
    overflow:hidden;
    background-color:blue;
    webkit-box-shadow: 0px 1px 7px 3px rgba(0, 0, 0, 0.7);
    -moz-box-shadow: 0px 1px 7px 3px rgba(0, 0, 0, 0.7);
    box-shadow: 0px 1px 7px 3px rgba(0, 0, 0, 0.7);
    }
    
    //content
    .push{height:4em;}
    #content{
    border:0px solid black;
    width:950px;
    height: auto;
    }
    .header{
    margin-top:10px;
    border:0px solid black;
    height:70px;
    float:right;
    }
    #divider{
    border-left:1px solid white;
    border-right:1px solid #D4D4D4;
    }
    #header1{width:470px;
    }
    #header2{width:470px;
    }
    

    See this one – http://jsfiddle.net/aniketpant/U5CSv/

    Just removed the 2 margins you had put.

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

Sidebar

Related Questions

I made a UIView using Interface Builder with a top bar that has Cancel
I have a page that I want centered, with a background and a border
I made a website that depends on PHP, AJAX and Javascript. The problem here
I made a class that derives from Component: public class MyComponent: System.ComponentModel.Component { }
I made a code that translate strings to match each word from the array
I made a plist that looks like that: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC
I made a UITableViewCell subclass, and now I want that subclass to be clever.
I know that a lot of Y2K efforts/scare was somehow centered on COBOL, deservedly
I have an image that will be centered (left and right) in the window,
My application is a simple WebView wrapper that displays a web page in a

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.