| 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 |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
| 5 <head> |
| 6 |
| 7 <title>CSS Test: floats - zero height empty float</title> |
| 8 |
| 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> |
| 10 |
| 11 <!-- Inspired by http://test.csswg.org/suites/css2.1/20100727/html4/floats-107
.htm --> |
| 12 |
| 13 <link rel="help" title="Section 9.5 Floats" href="http://www.w3.org/TR/CSS21/v
isuren.html#floats" /> |
| 14 <link rel="match" href="float-006-ref.xht" /> |
| 15 |
| 16 <meta content="A zero-height (margin-box) empty float without border and witho
ut padding will not require the line box to be shortened; in such case, the zero
-height (margin-box) empty float will slide in or will fit in at the top of the
line box." name="assert" /> |
| 17 <meta content="" name="flags" /> |
| 18 |
| 19 <style type="text/css"><![CDATA[ |
| 20 #rel-pos-containing-block {position: relative;} |
| 21 |
| 22 #green-overlapping-abs-pos |
| 23 { |
| 24 background-color: green; |
| 25 border-bottom: green solid 2em; |
| 26 border-top: green solid 2em; |
| 27 left: 0em; |
| 28 padding: 3em; |
| 29 position: absolute; |
| 30 width: 8em; |
| 31 z-index: auto; |
| 32 } |
| 33 |
| 34 #zero-height-first-float |
| 35 { |
| 36 float: left; |
| 37 width: 18em; |
| 38 /* |
| 39 or any other width number which would |
| 40 represent less than the document box width |
| 41 */ |
| 42 } |
| 43 |
| 44 #red-overlapped-second-float |
| 45 { |
| 46 background-color: red; |
| 47 float: left; |
| 48 padding: 5em; |
| 49 width: 4em; |
| 50 } |
| 51 ]]></style> |
| 52 |
| 53 </head> |
| 54 |
| 55 <body> |
| 56 |
| 57 <p>Test passes if there is a filled green rectangle and <strong>no red</strong
>.</p> |
| 58 |
| 59 <div id="rel-pos-containing-block"> |
| 60 <div id="green-overlapping-abs-pos"></div> |
| 61 <div id="zero-height-first-float"></div> |
| 62 <div id="red-overlapped-second-float"></div> |
| 63 </div> |
| 64 |
| 65 </body> |
| 66 </html> |
| OLD | NEW |