position-absolute-008a.xht (1337B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: Float is computed to 'none' when element is absolutely positioned</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" title="9.7 Relationships between 'display', 'position', and 'float'" /> 11 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 12 13 <meta name="assert" content="Float is computed to 'none' when 'position: absolute' is specified." /> 14 15 <style type="text/css"><![CDATA[ 16 div 17 { 18 height: 100px; 19 width: 100px; 20 } 21 22 div#rel-pos-container 23 { 24 position: relative; 25 width: auto; 26 } 27 28 div#abspos-green-overlapping 29 { 30 background-color: green; 31 float: right; 32 left: auto; 33 position: absolute; 34 top: auto; 35 } 36 37 div#static-red-overlapped 38 { 39 background-color: red; 40 position: static; 41 } 42 ]]></style> 43 </head> 44 45 <body> 46 47 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 48 49 <div id="rel-pos-container"> 50 <div id="abspos-green-overlapping"></div> 51 <div id="static-red-overlapped"></div> 52 </div> 53 54 </body> 55 </html>