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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:12:47+00:00 2026-05-10T17:12:47+00:00

I have a container div that holds two internal divs; both should take 100%

  • 0

I have a container div that holds two internal divs; both should take 100% width and 100% height within the container.

I set both internal divs to 100% height. That works fine in Firefox, however in IE the divs do not stretch to 100% height but only the height of the text inside them.

The following is a simplified version of my style sheet.

#container {    height: auto;    width: 100%; }  #container #mainContentsWrapper {    float: left;     height: 100%;    width: 70%;    margin: 0;    padding: 0; }   #container #sidebarWrapper {          float: right;     height: 100%;    width: 29.7%;    margin: 0;    padding: 0; } 

Is there something I am doing wrong? Or any Firefox/IE quirks I am missing out?

  • 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. 2026-05-10T17:12:47+00:00Added an answer on May 10, 2026 at 5:12 pm

    I think ‘works fine in Firefox’ is in the Quirks mode rendering only. In the Standard mode rendering, that might not work fine in Firefox too.

    percentage depends on ‘containing block’, instead of viewport.

    CSS Specification says

    The percentage is calculated with respect to the height of the generated box’s containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to ‘auto’.

    so

    #container { height: auto; } #container #mainContentsWrapper { height: n%; } #container #sidebarWrapper { height: n%; } 

    means

    #container { height: auto; } #container #mainContentsWrapper { height: auto; } #container #sidebarWrapper { height: auto; } 

    To stretch to 100% height of viewport, you need to specify the height of the containing block (in this case, it’s #container). Moreover, you also need to specify the height to body and html, because initial Containing Block is ‘UA-dependent’.

    All you need is…

    html, body { height:100%; } #container { height:100%; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer No, you can't access static libraries directly from C#. You… May 11, 2026 at 12:16 pm
  • added an answer The only reliable way to do this would be to… May 11, 2026 at 12:16 pm
  • added an answer The only reliable way I got this to work for… May 11, 2026 at 12:16 pm

Related Questions

I have a container div that holds two internal divs; both should take 100%
In a web application, I have a page that contains a DIV that has
I have a div element that has an id and this div contains a
I have a container div with a fixed width and height , with overflow:
I have a div container and have defined its style as follows: div#tbl-container {
I have a Div Tag which contains 4 child Div Tags <Div id=Parent> <div
I have a container filled with pairs. I want to iterate in it using
I have a container element which I need to resize as its contents change.
I have a container of custom controls each of which have 2 controls in
Let's say I have a container (std::vector) of pointers used by a multi-threaded application.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.