float-002.xht (1781B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Float set to 'right'</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-03-26 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" /> 8 <meta name="assert" content="The 'float' property set to 'right' correctly aligns the element to the right and text/objects flow around it." /> 9 <style type="text/css"> 10 #div1 11 { 12 border: 2px solid orange; 13 width: 500px; 14 } 15 #div2 16 { 17 float: right; 18 background: blue; 19 height: 1in; 20 width: 1in; 21 } 22 </style> 23 </head> 24 <body> 25 <p>Test passes if the blue square is in the upper right corner of the orange box and the "Filler Text" flows around the blue square.</p> 26 <div id="div1"> 27 <div id="div2"></div> 28 Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text 29 </div> 30 </body> 31 </html>