caption-side-example-001.xht (1400B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 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="assert" content="Caption-side, text-align and width properties of a caption work together as expected (example from section 17.4.1)." /> 8 <style type="text/css"> 9 table 10 { 11 background-color: blue; 12 } 13 caption 14 { 15 caption-side: bottom; 16 text-align: left; 17 width: auto; 18 } 19 td 20 { 21 height: 10em; 22 width: 20em; 23 } 24 </style> 25 </head> 26 <body> 27 <p>Test passes if the "Filler Text" is below the blue box and does not extend beyond the boxes right edge.</p> 28 <table> 29 <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> 30 <tr> 31 <td></td> 32 </tr> 33 </table> 34 </body> 35 </html>