table-caption-003.xht (963B)
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: CSS Tables: Captions in the middle of tables</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/table/caption/002.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes" /> 8 <style type="text/css"> 9 .table { display: table; width: 100%; } 10 .caption { display: table-caption; } 11 .cell { display: table-cell; } 12 .green { color: green; } 13 </style> 14 </head> 15 <body> 16 <p>There should be two green lines below.</p> 17 <div class="table"> 18 <div class="green cell"> 2. This line sho</div> 19 <div class="green caption"> 1. This line should be green. </div> 20 <div class="green cell">uld be green. </div> 21 </div> 22 </body> 23 </html>