block-in-inline-001.xht (1319B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: CSS: Blocks Within Inlines - Basic</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/ib/001.xml" type="application/xhtml+xml"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level" /> 8 <link rel="match" href="block-in-inline-001-ref.xht" /> 9 10 <meta name="assert" content="When an inline box contains a block box, 11 the inline box is broken around the block."/> 12 <style type="text/css"> 13 td { border: solid black; padding: 0; background: red; color: red; } 14 .inline { display: inline; background: lime; color: black; } 15 .block { display: block; background: green; } 16 div { color: black; } 17 .a, .c { background: lime; } 18 .b { background: green; } 19 </style> 20 </head> 21 <body> 22 <p>The following two boxes should look identical.</p> 23 <table> 24 <tr> 25 <td> 26 <span class="inline">Line 1<span class="block">Line 2</span>Line 3</span> 27 </td> 28 <td> 29 <div class="a">Line 1</div> 30 <div class="b">Line 2</div> 31 <div class="c">Line 3</div> 32 </td> 33 </tr> 34 </table> 35 </body> 36 </html>