floats-wrap-bfc-004.xht (4202B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head> 2 <title>CSS Test: Test for flow around floats</title> 3 <link rel="author" title="L. David Baron" href="https://dbaron.org/" /> 4 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> 5 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 6 <link rel="match" href="floats-wrap-bfc-004-ref.xht"/> 7 <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." /> 8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 9 <meta http-equiv="Content-Style-Type" content="text/css" /> 10 <style type="text/css"> 11 12 table { margin: 0; border-spacing: 0; } 13 td, th { padding: 0; } 14 15 </style> 16 </head> 17 <body> 18 19 <table width="300" style="background: aqua"><tbody><tr><td> 20 <div style="float:left; background:blue; width: 100px; height: 20px"></div> 21 <div style="float:left; background:silver; width: 100px; height: 6px"></div> 22 <table style="background: yellow"><tbody><tr><td> 23 <div style="width: 150px; height: 10px; background: purple"></div> 24 </td></tr></tbody></table> 25 </td></tr></tbody></table> 26 27 <table width="300" style="background: aqua"><tbody><tr><td> 28 <div style="float:left; background:blue; width: 100px; height: 20px"></div> 29 <div style="float:right; background:silver; width: 100px; height: 6px"></div> 30 <table style="background: yellow"><tbody><tr><td> 31 <div style="width: 150px; height: 10px; background: purple"></div> 32 </td></tr></tbody></table> 33 </td></tr></tbody></table> 34 35 <table width="300" style="background: aqua"><tbody><tr><td> 36 <div style="float:right; background:blue; width: 100px; height: 20px"></div> 37 <div style="float:left; background:silver; width: 100px; height: 6px"></div> 38 <table style="background: yellow"><tbody><tr><td> 39 <div style="width: 150px; height: 10px; background: purple"></div> 40 </td></tr></tbody></table> 41 </td></tr></tbody></table> 42 43 <table width="300" style="background: aqua"><tbody><tr><td> 44 <div style="float:right; background:blue; width: 100px; height: 20px"></div> 45 <div style="float:right; background:silver; width: 100px; height: 6px"></div> 46 <table style="background: yellow"><tbody><tr><td> 47 <div style="width: 150px; height: 10px; background: purple"></div> 48 </td></tr></tbody></table> 49 </td></tr></tbody></table> 50 51 <table width="300" style="background: aqua"><tbody><tr><td> 52 <div style="float:left; background:blue; width: 100px; height: 20px"></div> 53 <div style="float:left; background:silver; width: 100px; height: 6px"></div> 54 <div style="overflow: hidden; background: yellow"> 55 <div style="width: 150px; height: 10px; background: purple"></div> 56 </div> 57 </td></tr></tbody></table> 58 59 <table width="300" style="background: aqua"><tbody><tr><td> 60 <div style="float:left; background:blue; width: 100px; height: 20px"></div> 61 <div style="float:right; background:silver; width: 100px; height: 6px"></div> 62 <div style="overflow: hidden; background: yellow"> 63 <div style="width: 150px; height: 10px; background: purple"></div> 64 </div> 65 </td></tr></tbody></table> 66 67 <table width="300" style="background: aqua"><tbody><tr><td> 68 <div style="float:right; background:blue; width: 100px; height: 20px"></div> 69 <div style="float:left; background:silver; width: 100px; height: 6px"></div> 70 <div style="overflow: hidden; background: yellow"> 71 <div style="width: 150px; height: 10px; background: purple"></div> 72 </div> 73 </td></tr></tbody></table> 74 75 <table width="300" style="background: aqua"><tbody><tr><td> 76 <div style="float:right; background:blue; width: 100px; height: 20px"></div> 77 <div style="float:right; background:silver; width: 100px; height: 6px"></div> 78 <div style="overflow: hidden; background: yellow"> 79 <div style="width: 150px; height: 10px; background: purple"></div> 80 </div> 81 </td></tr></tbody></table> 82 83 84 85 </body></html>