block-non-replaced-height-002.xht (1358B)
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'</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="assert" content="The margin top and bottom used values are '0' for block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and margin top and bottom both are 'auto'." /> 8 <style type="text/css"> 9 #div1 10 { 11 border-bottom: solid orange; 12 border-top: solid orange; 13 width: 1in; 14 } 15 div div 16 { 17 background: blue; 18 margin-bottom: auto; 19 margin-top: auto; 20 } 21 html, body 22 { 23 overflow: scroll; 24 } 25 </style> 26 </head> 27 <body> 28 <p>Test passes if there is no white space between the blue box below and the orange lines.</p> 29 <div id="div1"> 30 <div>Filler Text</div> 31 </div> 32 </body> 33 </html>