floats-037.xht (941B)
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: Floated right element aligns with current line box</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 7 <meta name="assert" content="A line box aligns with the top of a right floated box." /> 8 <style type="text/css"> 9 div 10 { 11 width: 2in; 12 } 13 #span1 14 { 15 float: right; 16 } 17 </style> 18 </head> 19 <body> 20 <p>Test passes if the "Filler Text" below is all on the same line.</p> 21 <div> 22 <span>Filler Text</span> 23 <span id="span1">Filler Text</span> 24 </div> 25 </body> 26 </html>