floats-038.xht (1872B)
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: Floats and table margins</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-04 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 8 <link rel="match" href="floats-038-ref.xht" /> 9 10 <meta name="assert" content="The border box of a table cannot overlap any floats in the same block formatting context as the elements itself." /> 11 <style type="text/css"> 12 #div1 13 { 14 border: black solid 5px; 15 height: 2in; 16 width: 2in; 17 } 18 div div 19 { 20 height: 0.5in; 21 width: 0.5in; 22 } 23 #div2 24 { 25 background: blue; 26 float: left; 27 } 28 #table 29 { 30 background: orange; 31 display: table; 32 border: white solid 10px; 33 } 34 #row 35 { 36 display: table-row; 37 } 38 #cell 39 { 40 display: table-cell; 41 } 42 </style> 43 </head> 44 <body> 45 <p>Test passes if the orange square is to the right of the blue square, space needs to also separate the orange square from other squares.</p> 46 <div id="div1"> 47 <div id="div2"></div> 48 <div id="table"> 49 <div id="row"> 50 <div id="cell"></div> 51 </div> 52 </div> 53 </div> 54 </body> 55 </html>