block-formatting-context-height-003.xht (1807B)
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 formatting context auto height with floated descendants outside the normal flow and bottom 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-09-26 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#root-height" /> 8 <link rel="match" href="block-formatting-context-height-003-ref.xht" /> 9 10 <meta name="assert" content="The auto height of a block formatting context element does not account for bottom margins of floated content descendents of out of flow blocks." /> 11 <style type="text/css"> 12 #container 13 { 14 width: 100px; 15 height: auto; 16 background: black; 17 position: absolute; 18 } 19 #sibling 20 { 21 height: 50px; 22 width: 100px; 23 } 24 #absolute 25 { 26 position: absolute; 27 width: 100px; 28 height: 50px; 29 } 30 #float 31 { 32 margin-bottom: 50px; 33 height: 50px; 34 width: 100%; 35 } 36 </style> 37 </head> 38 <body> 39 <p>Test passes if there is a black rectangle which is wider than it is tall.</p> 40 <div id="container"> 41 <div id="sibling"></div> 42 <div id="absolute"> 43 <div id="float"></div> 44 </div> 45 </div> 46 </body> 47 </html>