separated-border-model-004.xht (1762B)
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: Width of a table in separated borders mode</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#separated-borders" /> 7 <meta name="assert" content="The width of a CSS table is the distance from the left inner padding edge to the right inner padding edge (including the border spacing but excluding padding and border)." /> 8 <style type="text/css"> 9 #table 10 { 11 display: table; 12 width: 200px; 13 padding: 0 50px; 14 border-spacing: 50px 0; 15 border-right: 100px solid white; 16 border-left: 100px solid white; 17 } 18 #tr 19 { 20 display: table-row; 21 } 22 #td 23 { 24 display: table-cell; 25 background: black; 26 height: 10px; 27 width: 50px; 28 overflow: visible; 29 } 30 #reference 31 { 32 background: blue; 33 left: 208px; 34 height: 10px; 35 margin-top: 10px; 36 position: absolute; 37 width: 100px; 38 } 39 </style> 40 </head> 41 <body> 42 <p>Test passes if the black and blue boxes are the same width.</p> 43 <div id="table"> 44 <div id="tr"> 45 <div id="td"></div> 46 </div> 47 </div> 48 <div id="reference"></div> 49 </body> 50 </html>