This particular combination is just not feasible.
The outer element has a minimum height, meaning its height depends on its content. If the content exceeds 100%, then the actual height of the outer element will be more than what the min-height specifies.
Now, you want the inner element to also have a min-height of 100% - this means the inner element needs to reference the outer element to determine its height, and vice versa for the outer element. This creates an unsolvable equation.
Therefore, you must explicitly set a height for the outer element: height:100%
UPDATE in response to your query:
Can you explain why @George's workaround is effective?
height:1px
serves as an initial value for the equation.
By giving the inner element a definite starting height of 1px
, the outer element can now calculate the minimum of (100%
,
height-determined-by-height-of-child-element
) which results in
100%
(of the parent's height,
body
), leading to a specific pixel value as the calculated result.
Subsequently, the min-height:100%
for the inner element becomes applicable as well - since the outer element has an effective pixel value, it can calculate the minimum of (100% of that-pixel-value
, 1px
) resulting in the same pixel value as the outer element effectively has.