| 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: 'left' property defines the offset from the left edge o
f the containing block</title> |
| 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> |
| 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtal
bot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 --> |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-r
ight" /> |
| 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-
props" /> |
| 9 <link rel="match" href="left-offset-003-ref.xht" /> |
| 10 |
| 11 <meta name="flags" content="" /> |
| 12 <meta name="assert" content="The 'left' property, for absolute positioni
ng, specifies the offset of the element in relation to the containing block's le
ft edge. In this test, the containing block of the absolutely positioned element
is formed by the padding box of its nearest (closest) non-inline positioned anc
estor element." /> |
| 13 <style type="text/css"> |
| 14 #container |
| 15 { |
| 16 border: solid blue; |
| 17 height: 1in; |
| 18 padding-left: 0.25in; |
| 19 position: relative; |
| 20 width: 1in; |
| 21 } |
| 22 #div1 |
| 23 { |
| 24 background: black; |
| 25 height: 0.5in; |
| 26 position: absolute; |
| 27 left: 0.75in; |
| 28 width: 0.5in; |
| 29 } |
| 30 #div2 |
| 31 { |
| 32 height: 1in; |
| 33 width: 1in; |
| 34 } |
| 35 </style> |
| 36 </head> |
| 37 <body> |
| 38 <p>Test passes if a filled black square is in the upper-right corner of
an hollow blue rectangle.</p> |
| 39 <div id="container"> |
| 40 <div id="div1"></div> |
| 41 <div id="div2"></div> |
| 42 </div> |
| 43 </body> |
| 44 </html> |
| OLD | NEW |