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 :-) 2. 3. 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" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <TITLE>Table CSS-Style "heigh:percentaget"-demonstration</TITLE> </HEAD> <BODY> <TABLE style="height:100%; width:100%" BORDER="1"> <TR> <TH> Demonstration of style bug</TH> </TR> <TR> <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> </TR> </TABLE> </BODY> </HTML>
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
maybe this is a duplicate of #59992?
Boris Zbarsky's solution and interpretation is very convincing to me. The CSS-Dokumentations says: <blockquote> <percentage> 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?. auto The height depends on the values of other properties. See the prose below. </blockquote> 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.
Status: UNCONFIRMED → RESOLVED
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 box. http://www.w3.org/TR/REC-CSS2/visudet.html#containing-block-details The viewport is the actual frame and it contains the initial containing box http://www.w3.org/TR/REC-CSS2/visuren.html#q2 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. http://www.w3.org/TR/REC-CSS2/visuren.html#initial-containing-block The default is auto http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-height
*** Bug 71927 has been marked as a duplicate of this bug. ***
*** 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.