Closed Bug 277112 Opened 20 years ago Closed 20 years ago

CSS : element height=100% problem

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: chrilith, Assigned: dbaron)

Details

using the following code, you will see that the container div(d1) become smaller
in height that his content div(d2), puting the window bottom (browser) in the
middle of the green block and scrolling down.

<style>
.d1	{	background-color:red;
		height:100%;
		width:200px;
		padding:5px;
	}

.d2	{	background-color:green;
		height:300px;
		width:100%;
	}
</style>

<div class="d1">
	<div class="d2"></div>
<div>
Summary: CSS : element width=100% problem → CSS : element height=100% problem
http://www.w3.org/TR/CSS21/visudet.html#the-height-property
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Component: Style System (CSS) → Layout: Block and Inline
Resolution: --- → INVALID
"A percentage height on the root element is relative to the viewport."

Ok, but does it mean that the container can be smaller than the content in tha 
case ?
Yes.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.