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 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
  • 1 View
  • 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

Related Questions

I have a container div (it has both width an height set in pixels).
I have a page with a container div that holds three additional divs as
I have a container div that holds many child divs. One of the divs
I have a div that contains two other divs,, like this: ---------------------------- | |
I have a container div that has the height of my body which is
I have a jQuery draggable container div with a side scroll bar that should
I have a container div listings_container that contains a variable number of divs listing
I have an animation on a partially hidden div container that will execute when
i have a div that i use as a container to fit in footer
I have a big <div /> container that has an image as a background.

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.