caption-side-example-001

Caption border and table border

WeasyPrint

This browser

Assertion
Caption-side, text-align and width properties of a caption work together as expected (example from section 17.4.1).

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: Caption border and table border</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#caption-position">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Caption-side, text-align and width properties of a caption work together as expected (example from section 17.4.1)."> 
 9         <style type="text/css">
10             table
11             {
12                 background-color: blue;
13             }
14             caption
15             {
16                 caption-side: bottom;
17                 text-align: left;
18                 width: auto;
19             }
20             td
21             {
22                 height: 10em;
23                 width: 20em;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if the "Filler Text" is below the blue box and does not extend beyond the boxes right edge.</p>
29             <table>
30                 <caption>Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text</caption>
31                 <tr>
32                     <td></td>
33                 </tr>
34             </table>
35     </body>
36 </html>