floats-141.xht (1007B)
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: Floats: No higher than earlier floats</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/float/041.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 8 <link rel="match" href="floats-141-ref.xht" /> 9 10 <style type="text/css"> 11 p { color: blue; } 12 .container { width: 20em; } 13 .float { float: left; padding: 0.2em; margin: 0.2em; border: thin solid; } 14 .a { color: fuchsia; width: 12em; } 15 .b { color: orange; width: 8em; } 16 .c { color: orange; width: 4em; } 17 </style> 18 </head> 19 <body> 20 <p>C must not be above B.</p> 21 <div class="container"> 22 <div class="float a">A</div> 23 <div class="float b">B</div> 24 <div class="float c">C</div> 25 </div> 26 </body> 27 </html>