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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:03:38+00:00 2026-05-26T20:03:38+00:00

I have the following page: <!DOCTYPE html> <html> <head> <style type=text/css> html, body {

  • 0

I have the following page:

    <!DOCTYPE html>
    <html>
    <head>
        <style type="text/css">
            html, body
            {
                height:100%;
            }
            #outer
            {
                width:80%;        
                min-width:600px;
                height:80%;
                min-height:600px;
                margin: 0 auto;
                border:2px dashed red;
            }
            #inner
            {
                height:100%;
                width:100%;
                border:2px dashed blue;
            }
        </style>
    </head>
    <body>
        <div id="outer">
            <div id="inner">          
            </div>
        </div>
    </body>
    </html>

My expectation is that inner div will remain 100% of the height of the outer div once the min-height is hit (both will be 600px). This is the case in IE9 and FF8. I think that this is correct, based on the W3C: http://www.w3.org/TR/CSS2/visudet.html#the-height-property.

From the W3C page:

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’.

My parent element has an explicitly specified height, so no need for the absolute positioning, I would think. (For what it’s worth, absolutely positioning the outer div does solve the problem- but it shouldn’t be necessary.)

In Chrome, however, the inner div shrinks with the resizing of the window after the min-height on the outer div is hit, instead of remaining 100% of the height of the outer div, 600px;

I guess I have two questions: which interpretation is correct? Is there a workaround for this?

  • 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-26T20:03:38+00:00Added an answer on May 26, 2026 at 8:03 pm

    Workaround part is easy:

    1. Easiest way is to add “min-height: 600px;” (or “min-height: inherit;”) to the #inner too.

    2. If for some reason you need to for some reason inherit it from parent you can do following:

      1. Add “position: relative;” to #outer.
      2. Add “position: absolute; top: 0; right: 0; bottom: 0; left: 0;” and remove “width: 100%; height: 100%;” from #inner.

    About the right interpretation: It’s a bug. You can read more about this in answers to this question: The inherited height of a child div from a parent with a min-height attribute

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

Sidebar

Related Questions

I have the following html code <!DOCTYPE html> <html lang=en> <head> <meta name=viewport content=width=device-width;
I have the following page: <!DOCTYPE HTML> <html> <head> <meta charset=utf-8> <title>Untitled Document</title> </head>
I have the following page: <!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>Title</title> <link rel=stylesheet
I have the following webform: <%@ Page Language=C# AutoEventWireup=true CodeBehind=Default.aspx.cs Inherits=TestWebApp.Default %> <!DOCTYPE html
I have the following Javascript libraries loaded for my page. <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js></script> <script
I have the following code on my page: <p align=justify style=font-size:10pt;display:block;height:200px;vertical-align:middle;> Content </p> I
Suppose I have the following CSS rule in my page: body { font-family: Calibri,
I have the following html page: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
We have a page similar to the following: <?xml version=1.0 encoding=ISO-8859-1?> <!DOCTYPE html PUBLIC
I have the following simple page: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>

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.