table-height-algorithm-025

Finding the baseline of a cell

WeasyPrint

This browser

Assertion
The baseline of a cell is the baseline of the first in-flow line box in the cell or first in-flow table-row in the cell, whichever comes first.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Finding the baseline of a cell</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The baseline of a cell is the baseline of the first in-flow line box in the cell or first in-flow table-row in the cell, whichever comes first.">
 9         <style type="text/css">
10             table
11             {
12                 border-spacing: 0;
13             }
14             .inline
15             {
16                 display: inline-table;
17             }
18             td
19             {
20                 vertical-align: baseline;
21             }
22         </style>
23     </head>
24     <body>
25         <p>Test passes if the bottom of the "Filler Text" below is aligned.</p>
26         <table>
27             <tr>
28                 <td>
29                     <h1>Filler Text</h1>
30                     <table class="inline">
31                         <tr>
32                             <td>&nbsp;</td>
33                         </tr>
34                     </table>
35                 </td>
36                 <td>
37                     <table class="inline">
38                         <tr>
39                             <td>Filler Text</td>
40                         </tr>
41                     </table>
42                     <h1>&nbsp;</h1>
43                 </td>
44             </tr>
45         </table>
46     </body>
47 </html>