| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "
http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> |
| 2 |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
| 5 <head> |
| 6 |
| 7 <title>CSS Test: Absolutely positioned inline replaced element, 'auto' specifi
ed for 'margin-left', 'margin-right', no intrinsic width and no intrinsic ratio<
/title> |
| 8 |
| 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> |
| 10 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-wi
dth" /> |
| 11 <link rel="match" href="absolute-replaced-width-003c-ref.xht" /> |
| 12 |
| 13 <meta name="flags" content="nonHTML svg" /> |
| 14 <meta name="assert" content="If an absolutely positioned inline replaced eleme
nt (like the svg element in this test) has no intrinsic width and no intrinsic r
atio, then the used value of 'width' becomes 300px. Then, if both left and right
values are 'auto' and the 'direction' property of the element establishing the
static-position containing block is 'ltr', then set 'left' to the static positio
n. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto'
on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto'
left (like in this test: right is 'auto'), solve the equation for that value."
/> |
| 15 |
| 16 <style type="text/css"><![CDATA[ |
| 17 div |
| 18 { |
| 19 height: 300px; |
| 20 width: 600px; |
| 21 } |
| 22 |
| 23 svg#overlapped-red {position: absolute;} |
| 24 |
| 25 div#overlapping-green |
| 26 { |
| 27 background-color: green; |
| 28 height: 300px; |
| 29 left: auto; |
| 30 position: absolute; |
| 31 top: auto; |
| 32 width: 300px; |
| 33 } |
| 34 ]]></style> |
| 35 |
| 36 </head> |
| 37 |
| 38 <body> |
| 39 |
| 40 <p>Test passes if there is a big filled green square and <strong>no red</stron
g>.</p> |
| 41 |
| 42 <div> |
| 43 <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile=
"full" id="overlapped-red" height="300"> |
| 44 <svg:rect x="0" y="0" width="600" height="300" fill="red" /> |
| 45 </svg:svg> |
| 46 |
| 47 <div id="overlapping-green"></div> |
| 48 </div> |
| 49 |
| 50 </body> |
| 51 </html> |
| OLD | NEW |