display-018.xht (1434B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: display - sub-table elements with 'display' set to 'inline'</title> 8 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop" /> 10 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 11 <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" /> 12 <link rel="match" href="display-018-ref.xht" /> 13 14 <meta content="When an element with its property 'display' set to 'inline', then it makes its box laid out horizontally, beginning at the top of its containing block without beginning on a new line and without requiring to begin on a new line. Elements with 'display' set to 'inline' are laid out horizontally, one after the other, in the line box." name="assert" /> 15 16 <style type="text/css"><![CDATA[ 17 table, caption, tbody, tr, th, td 18 { 19 display: inline; 20 vertical-align: baseline; 21 } 22 23 th, td {padding: 0px;} 24 ]]></style> 25 26 </head> 27 28 <body> 29 30 <p>Test passes if the 3 "Filler text" are all on the same line.</p> 31 32 <table> 33 <caption>Filler text</caption> 34 35 <tbody> 36 37 <tr> 38 <th>Filler</th> 39 <td>text</td> 40 </tr> 41 42 <tr> 43 <th>Filler</th> 44 <td>text</td> 45 </tr> 46 47 </tbody> 48 49 </table> 50 51 </body> 52 </html>