width-undefined-001.xht (1270B)
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 containing block is determined by with of child</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property" /> 7 <meta name="flags" content="ahem" /> 8 <meta name="assert" content="The containing block's width depends on this element's width because the resulting layout has not been defined in CSS2.1." /> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 #span1 12 { 13 background-color: red; 14 font: 1in/1em Ahem; 15 left: 10px; 16 position: absolute; 17 top: 10px; 18 } 19 p 20 { 21 margin-top: 1.1in; 22 } 23 </style> 24 </head> 25 <body> 26 <p>Test passes if there is no red visible on the page.</p> 27 <div> 28 <span id="span1"> 29 <span>XX</span> 30 </span> 31 </div> 32 </body> 33 </html>