| 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: Margin affects left floated elements</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-07-02 --> |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /
> |
| 8 <link rel="match" href="floats-026-ref.xht" /> |
| 9 |
| 10 <meta name="flags" content="" /> |
| 11 <meta name="assert" content="Right outer edge of left-floating box canno
t be to the right of the left outer edge of any right-floating box that is to th
e right of it." /> |
| 12 <style type="text/css"> |
| 13 div |
| 14 { |
| 15 border: solid 5px black; |
| 16 height: 2in; |
| 17 width: 2in; |
| 18 } |
| 19 span |
| 20 { |
| 21 height: 1in; |
| 22 width: 1in; |
| 23 } |
| 24 #span1 |
| 25 { |
| 26 background: blue; |
| 27 float: left; |
| 28 margin-right: 10px; |
| 29 } |
| 30 #span2 |
| 31 { |
| 32 background-color: orange; |
| 33 float: right; |
| 34 margin-left: 10px; |
| 35 } |
| 36 </style> |
| 37 </head> |
| 38 <body> |
| 39 <p>Test passes if the blue square is aligned on the left side of the hol
low black square and is above the orange, right aligned, square.</p> |
| 40 <div> |
| 41 <span id="span1"></span> |
| 42 <span id="span2"></span> |
| 43 </div> |
| 44 </body> |
| 45 </html> |
| OLD | NEW |