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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:15:12+00:00 2026-05-28T00:15:12+00:00

I am trying to lay out a web application and running into problems with

  • 0

I am trying to lay out a web application and running into problems with divs stretching outside of body and html.

http://jsfiddle.net/dex3703/Pftpu/

The pink inner div extends outside of its container when set to 100% height. Why is this and how do I fix it?

  • 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-28T00:15:13+00:00Added an answer on May 28, 2026 at 12:15 am
    • #header has a height of 55px.
    • #topnav has a height of 65px.
    • #mainsection has a height of 90%.
    • #drawer has a height of 50px.

    You’re trying to assert that 55px + 65px + 90% + 50px = 100%, but you can’t do that. It will be true for some height (where the height of your whole content is 1700px, see below), but not all heights:

    55px + 65px + 90% + 50px = 100%
    55px + 65px + 50px       = 10%
    170px                    = 10%
    1700px                   = 100%
    

    EDIT: You can achieve what you want by using relative/absolute positions appropriately. See the following jsFiddle: http://jsfiddle.net/Pftpu/12/

    Note that this will still be greater than 100% because of the borders around the entirety of the page. You can wrap them in another div, but I wanted to show this example by only changing the CSS properties relevant to the main issue you were having.

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

Sidebar

Related Questions

I am trying to figure out how to get a Dashcode web application to
Ive been trying to convert my asp.net website into a web application following the
I am trying to lay out a table-like page with two columns. I want
First I'll lay out what I'm trying to achieve in case there's a different
I'm trying to figure out how to best lay this out. I'll explain what
I am trying to use hijacking to do a single-page web application using mvc.
First Some Background I'm planning out the architecture for a new PHP web application
I am trying to put log4j in a web application in Tomcat 7. I
I'm trying to add log4net logging to a web application I'm writing. I've got
So I am trying to set up Log4Net in my Web .NET 4.0 application.

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.