| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>CSS Test: Height determination for block-level non-replaced eleme
nts in normal flow when 'overflow' does not compute to 'visible' and elements' m
argins collapse</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-bl
ock" /> |
| 7 <meta name="flags" content="" /> |
| 8 <meta name="assert" content="The 'height' is the distance between the to
p border edge of the top most block-level child box that doesn't have margins co
llapsed, and the bottom border edge of the bottommost block-level child that doe
sn't have margins collapsed. When a block-level non-replaced element is in norma
l flow, 'overflow' does not compute to 'visible' but has been propagated to the
viewport and the 'height' is 'auto'." /> |
| 9 <style type="text/css"> |
| 10 html, body |
| 11 { |
| 12 overflow: scroll; |
| 13 } |
| 14 #div1 |
| 15 { |
| 16 position: relative; |
| 17 } |
| 18 #div2, #div3, #div4 |
| 19 { |
| 20 width: 1in; |
| 21 } |
| 22 #div2, #div3 |
| 23 { |
| 24 background: blue; |
| 25 height: 0.5in; |
| 26 } |
| 27 #div2 |
| 28 { |
| 29 border-top: 0.5in solid blue; |
| 30 margin-top: 0.5in; |
| 31 } |
| 32 #div3 |
| 33 { |
| 34 border-bottom: 0.5in solid blue; |
| 35 margin-bottom: 0.5in; |
| 36 } |
| 37 #div4 |
| 38 { |
| 39 background: blue; |
| 40 height: 2in; |
| 41 left: 1in; |
| 42 position: absolute; |
| 43 top: 0; |
| 44 } |
| 45 </style> |
| 46 </head> |
| 47 <body> |
| 48 <p>Test passes if there is a blue square below.</p> |
| 49 <div id="div1"> |
| 50 <div id="div2"></div> |
| 51 <div id="div3"></div> |
| 52 <div id="div4"></div> |
| 53 </div> |
| 54 </body> |
| 55 </html> |
| OLD | NEW |