table-height-algorithm-018

Vertical-align set to 'middle' with a spanning cell

WeasyPrint

This browser

Assertion
A spanning cell with 'vertical-align' set to 'middle' aligns content to the vertical center of the rows it spans.

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: Vertical-align set to 'middle' with a spanning 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="A spanning cell with 'vertical-align' set to 'middle' aligns content to the vertical center of the rows it spans.">
 9         <style type="text/css">
10             table
11             {
12                 height: 200px;
13             }
14             #cell
15             {
16                 border: 1px solid black;
17                 vertical-align: middle;
18             }
19         </style>
20     </head>
21     <body>
22         <p>Test passes if the "Filler Text" below is vertically aligned to the middle of the box.</p>
23         <table>
24             <tr>
25                 <td></td>
26                 <td id="cell" rowspan="2" colspan="2">Filler Text</td>
27             </tr>
28             <tr>
29                 <td></td>
30             </tr>
31         </table>
32     </body>
33 </html>