table-tag doesn't render correctly style="height:xx%"




CSS Parsing and Computation
17 years ago
16 years ago


(Reporter: Manuel Martin, Assigned: Pierre Saslawsky)



Firefox Tracking Flags

(Not tracked)




(1 attachment)



17 years ago
From Bugzilla Helper:
User-Agent: Mozilla 0.8
BuildID:    2001021508

This style is ignored:
<TABLE style="height:100%">
Seems to be related with 51000

Reproducible: Always
Steps to Reproduce:
1. Write a table which should cover the whole screen :-)

Actual Results:  Table is rendered correctly, except the height

Expected Results:  Table should fill whole "screen".

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	<TITLE>Table CSS-Style &quot;heigh:percentaget&quot;-demonstration</TITLE>
<TABLE style="height:100%; width:100%" BORDER="1">
<TH> Demonstration of style bug</TH>
<TD> This table should fill the whole page. Well, it doesn't in NS4.X, too, but
it works in IE5 and Opera (more or less).</TD>

Comment 1

17 years ago
Created attachment 25692 [details]
Your testcase is invalid, I believe..  The table should be filling the entire
height of the <body> element, which it does.

If you want to make the body the size of the viewport, add 

style="position: absolute; bottom: 0; top:0"

to the <body> tag. Then you will see that the table also fills the entire viewport.

Over to style system, but I think we are doing this right and IE/Opera are not...
Assignee: karnaze → pierre
Component: HTMLTables → Style System
OS: Windows 98 → All
QA Contact: chrisd → ian

Comment 3

17 years ago
maybe this is a duplicate of #59992?

Comment 4

17 years ago
Boris Zbarsky's solution and interpretation is very convincing to me.
The CSS-Dokumentations says:
Specifies a percentage height. The percentage is calculated with respect to
the height of the generated box?s containing block [p. 96] . If the height of
the containing block is not specified explicitly (i.e., it depends on content
height),the value is interpreted like ?auto?.
The height depends on the values of other properties. See the prose below.

The containing block's height is only set if position: absolute is set.

Sideeffect (is this valid english? dunno): the rendering on other browsers (IE,
Opera) is positively affected.

It's not a bug, it's a feature!
Case closed?
Confirmed on 2001022209 for Windows 2000. Why don't we mark it new to get it 
off the uncomfirmed radar?
If I remember right, the body tag is the size of the window frame. Bz, with 
you're interpretation, the table shouldn't fill the whole horizontal space.
Marking invalid since Manuel agrees with me that Mozilla is following the CSS spec.
Last Resolved: 17 years ago
Resolution: --- → INVALID
I think bz is right.

The containing block (called the initial containing block) in which the root 
element lives is chosen by the user agent. 
For other elements, unless the element is absolutely positioned, the containing 
block is formed by the content edge of the nearest block-level ancestor box. 

Notice also the table that says the initial containing block is UA-dependent 
(what does this mean?) and that the body is the size of the initial containing 

The viewport is the actual frame and it contains the initial containing box

The height of the initial containing block may be specified with the 'height' 
property for the root element. If this property has the value 'auto', the 
containing block height will grow to accommodate the document's content.

The default is auto
*** Bug 71927 has been marked as a duplicate of this bug. ***
QA Contact: ian → amar
*** Bug 168359 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.