RetroZilla/layout/html/tests/table/bugs/bug32205-2.html

77 lines
2.3 KiB
HTML
Raw Normal View History

2015-10-21 05:03:22 +02:00
<html>
<head>
<title>Bug Example for Bug 32205</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p>This is a simple example of table height problems with only a single table.
</p>
<p>The indention here is to specify a table with two rows. The table has a fixed
overall width (200 for the example) and two rows. The first row 'just high enough'
for a title line, and the second contains the rest. Creating such a table is
hamperd by a number of bugs</p>
<ol>
<li>If a height is specified for only one row (not both) then it will be ignored
</li>
<li> If specified heights are insufficient (because the content is too large)
then the entire table will be expanded. </li>
<li>Percentage heights appear to simply be translated into pixel heights prior
to other processing, so offer no additional solutions </li>
</ol>
<p>This following table ought to give the desired results (small title line, large
body)</p>
<p>It is specifiable as </p>
<blockquote>
<p>Table height: 200 <br>
First Row : 1 or 1% <i>(i.e. expand to minimum required)</i><br>
Second Row : unspecified <i> (i.e. table height - height of other rows+borders)
</i> </p>
</blockquote>
<table height=200 border=1>
<tr>
<td height=20> title line</td>
</tr>
<tr>
<td> rest of space</td>
</tr>
</table>
<p>This doesn't work because of the 1st bug above. </p>
<p>A second attempt is to specify heights that do add up to the total.</p>
<p> Table height: 200 <br>
First Row : 1 <br>
Second Row : 199 </p>
<table height=200 border=1>
<tr>
<td height=1> title line</td>
</tr>
<tr>
<td height=199> rest of space</td>
</tr>
</table>
<p>This appears ok, but close inspection will show that the table is now >200
pixels high (2rd bug). </p>
<p>A third attempt using 1% and 99% gives identical results (3rd bug).</p>
<p> A related bug is the the height of a row that is not specified explicitly
cannot be used by its children. </p>
<p>This example is a table of height 200 with a single row of unspecified height.
This contains a DIV whose style is height:100%. It ought to fill the entire
table. </p>
<table height=200 border=1>
<tr>
<td>
<div style="height:100%;background-color:red">A 100% div inside a row of unspecified height</div>
</td>
</tr>
</table>
</body>
</html>