c5525-fltmult-000.xht (2941B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: float</title> 5 <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html"/> 6 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 7 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-03 --> 8 <link rel="help" href="http://www.w3.org/TR/REC-CSS1#float"/> 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" title="9.5 Floats"/> 10 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" title="9.5.1 Positioning the float: the 'float' property"/> 11 <link rel="match" href="c5525-fltmult-000-ref.xht" /> 12 13 <meta name="flags" content="image" /> 14 15 <style type="text/css"><![CDATA[ 16 div.yellow, div.blue, div.silver, div.green { 17 width: 60px; padding: 20px; margin: 10px; 18 border: 20px solid black; float: left; text-align: center; 19 } 20 div.yellow {margin-left: 0px; background: yellow; color: black;} 21 div.blue {background: blue; color: white;} 22 div.silver {background: silver; color: black;} 23 div.green {background: green; color: white;} 24 div.below {clear: both;} 25 table {border-spacing: 0px; margin: 10px 0px; table-layout: fixed;} 26 td {padding: 0px; width: 20px;} 27 td.onehundred {width: 100px;} 28 ]]></style> 29 </head> 30 <body> 31 <p class="a"> 32 Below you should see four blocks side by side followed by a 33 matching cross section of the four blocks. 34 </p> 35 <div class="yellow"> 36 <p> 37 Yellow 38 </p> 39 </div> 40 <div class="blue"> 41 <p> 42 Blue 43 </p> 44 </div> 45 <div class="silver"> 46 <p> 47 Silver 48 </p> 49 </div> 50 <div class="green"> 51 <p> 52 Green 53 </p> 54 </div> 55 <div class="below"> 56 <table> 57 <tr> 58 <td style="background: black"> 59 60 </td> 61 <td class="onehundred" style="background: yellow"> 62 63 </td> 64 <td style="background: black"> 65 66 </td> 67 <td style="background: white"> 68 69 </td> 70 <td style="background: black"> 71 72 </td> 73 <td class="onehundred" style="background: blue"> 74 75 </td> 76 <td style="background: black"> 77 78 </td> 79 <td style="background: white"> 80 81 </td> 82 <td style="background: black"> 83 84 </td> 85 <td class="onehundred" style="background: silver"> 86 87 </td> 88 <td style="background: black"> 89 90 </td> 91 <td style="background: white"> 92 93 </td> 94 <td style="background: black"> 95 96 </td> 97 <td class="onehundred" style="background: green"> 98 99 </td> 100 <td style="background: black"> 101 102 </td> 103 </tr> 104 </table> 105 </div> 106 </body> 107 </html>