floats-137.xht (2758B)
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: Wrapping text around multiple 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/wrapping/001.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 8 <meta name="flags" content="ahem animated"/> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 .ahem { font: 1.25em/1 Ahem; background: yellow; color: navy; } 12 div.ahem { border: solid 1em navy; width: 10em; height: 10em; } 13 pre.ahem { width: 12em; height: 12em; } 14 span { font: 0.75em/1 serif; } 15 16 body.a .ahem, body.b .ahem { position: absolute; margin: 1em; } 17 body.a div.ahem { display: none; } 18 body.b pre.ahem { display: none; } 19 20 .aleft { text-align: left; } 21 .aright { text-align: right; } 22 .acenter { text-align: center; } 23 .ajustify { text-align: justify; } 24 25 .fleft { float: left; } 26 .fright { float: right; } 27 .fleft, .fright { background: navy; } 28 29 .cleft { clear: left; } 30 .cright { clear: right; } 31 .cleft.cright { clear: both; } 32 33 .w1 { width: 1em; } .h1 { height: 1em; } 34 .w2 { width: 2em; } .h2 { height: 2em; } 35 .w3 { width: 3em; } .h3 { height: 3em; } 36 .w4 { width: 4em; } .h4 { height: 4em; } 37 .w5 { width: 5em; } .h5 { height: 5em; } 38 39 </style> 40 </head> 41 <body class="test"> 42 <p>If scripting is supported: there should be only a single static jumble below with the word 43 "Control" blinking steadily. If there are two squares, or if the 44 square is animated, then the test has failed.</p> 45 46 <p>If scripting is unsupported: there should be two identical 47 patterned squares below.</p> 48 49 <script type="text/javascript"> 50 var body = document.body; 51 var timer; 52 function toggle() { 53 body.className = body.className == 'a' ? 'b' : 'a'; 54 timer = window.setTimeout(toggle, 500); 55 } 56 toggle(); 57 </script> 58 59 <p><button onclick="clearTimeout(timer); body.className = 'test';"> Examine </button></p> 60 61 <div class="ahem"> 62 1 63 <div class="fleft w2 h2"></div> 64 222222222 65 <div class="fleft w1 h2"></div> 66 <div class="fleft w1 h5"></div> 67 <div class="fleft w1 h1"></div> 68 <div class="fleft w2 h2"></div> 69 <div class="fleft w1 h1"></div> 70 3 444 55555555 66666 777777777 71 </div> 72 73 <pre class="ahem">############ 74 #AA1 # 75 #AA # 76 #B222222222# 77 #BCDEEF3 # 78 # C EE444 # 79 # C55555555# 80 # C66666 # 81 # C # 82 #777777777 # 83 # # 84 ############ <span>Control</span> 85 </pre> 86 87 </body> 88 </html>