1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en-US"><head>
3 <link rel="reference" href="floats-wrap-bfc-005-ref.xht">
4 <title>CSS Test: Test for flow around floats</title>
5 <link rel="author" title="L. David Baron" href="http://dbaron.org/">
6 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats">
8 <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.">
9 <meta name="flags" content="">
10 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
11 <meta http-equiv="Content-Style-Type" content="text/css">
12 <style type="text/css">
13
14 body { font-size: 10px; }
15
16 table { margin: 0; border-spacing: 0; }
17 td, th { padding: 0; vertical-align: top; }
18
19 </style>
20 </head>
21 <body>
22
23 <table width="300" style="background: aqua"><tbody><tr><td>
24 <div style="float:left; background:blue; width: 200px; height: 20px"></div>
25 <table width="50%" style="background: yellow" height="20"><tbody><tr><td>50%</td></tr></tbody></table>
26 </td></tr></tbody></table>
27
28 <table width="300" style="background: aqua"><tbody><tr><td>
29 <div style="float:right; background:blue; width: 200px; height: 20px"></div>
30 <table width="50%" style="background: yellow" height="20"><tbody><tr><td>50%</td></tr></tbody></table>
31 </td></tr></tbody></table>
32
33 <table width="300" style="background: aqua"><tbody><tr><td>
34 <div style="float:left; background:blue; width: 200px; height: 20px"></div>
35 <div style="overflow:hidden; background: yellow; width: 50%; height: 20px;">50%</div>
36 </td></tr></tbody></table>
37
38 <table width="300" style="background: aqua"><tbody><tr><td>
39 <div style="float:right; background:blue; width: 200px; height: 20px"></div>
40 <div style="overflow:hidden; background: yellow; width: 50%; height: 20px;">50%</div>
41 </td></tr></tbody></table>
42
43
44
45 </body></html>