block-non-replaced-height-006.xht (1862B)
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: Block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and 'height' is 'auto' adjust based on the line box height</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#normal-block" /> 7 <meta name="flags" content="ahem" /> 8 <meta name="assert" content="The 'height' is the distance from the topmost to the bottommost line box when a block-level non-replaced element is in normal flow and 'overflow' does not compute to 'visible'." /> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 html, body 12 { 13 overflow: scroll; 14 } 15 div 16 { 17 position: relative; 18 } 19 #div1 20 { 21 background: red; 22 width: 200px; 23 } 24 span 25 { 26 color: blue; 27 display: inline; 28 font: 100px/1 Ahem; 29 } 30 #div2 31 { 32 background: orange; 33 height: 200px; 34 left: 200px; 35 position: absolute; 36 top: 0; 37 width: 200px; 38 } 39 </style> 40 </head> 41 <body> 42 <p>Test passes if the blue and orange squares have the same height and if there is <strong>no red</strong>.</p> 43 <div> 44 <div id="div1"> 45 <span>XX XX</span> 46 </div> 47 <div id="div2"></div> 48 </div> 49 </body> 50 </html>