| 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: Inheriting 'top' changes from parent table-row through anonym
ous table boxes</title> |
| 5 <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/> |
| 6 <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.
net/contact"/> |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inher
it"/> |
| 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"
/> |
| 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-positio
n"/> |
| 10 <link rel="match" href="dynamic-top-change-002-ref.xht" /> |
| 11 |
| 12 <meta name="flags" content="dom" /> |
| 13 <meta name="assert" content="The position of a positioned element which inheri
ts its 'top' value from its parent changes when the parent's 'top' value is chan
ged even if the parent is display:table-row."/> |
| 14 <style type="text/css"><![CDATA[ |
| 15 p |
| 16 { |
| 17 line-height: 1.25; |
| 18 margin: 1em 0; |
| 19 } |
| 20 |
| 21 strong {line-height: 1;} |
| 22 |
| 23 .testDiv { width: 100px; height: 100px; } |
| 24 #green { top: 4em; background: green; position: absolute; } |
| 25 #red { top: inherit; background: red; position: relative; } |
| 26 #parent { position: absolute; top: 2em; } |
| 27 #intermediate { display: table-row; } |
| 28 ]]></style> |
| 29 <script type="text/javascript"><![CDATA[ |
| 30 window.onload = function() { |
| 31 document.body.offsetWidth; |
| 32 document.getElementById("intermediate").style.top = "2em"; |
| 33 } |
| 34 ]]></script> |
| 35 </head> |
| 36 <body> |
| 37 <p>Test passes if there is <strong>no red</strong>.</p> |
| 38 <div id="parent"> |
| 39 <div id="intermediate"> |
| 40 <div id="red" class="testDiv"></div> |
| 41 </div> |
| 42 </div> |
| 43 <div id="green" class="testDiv"></div> |
| 44 </body> |
| 45 </html> |
| OLD | NEW |