floats-wrap-bfc-003-right-overflow.xht (1473B)
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-003-right-overflow-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 span { display: inline-block; vertical-align: bottom; } 16 17 </style> 18 </head> 19 <body> 20 21 <table width="300" style="background: aqua"><tbody><tr><td> 22 23 <div style="float:right; background:blue; width: 100px; height: 100px"></div> 24 25 <div style="overflow: hidden; background: yellow"> 26 <span style="width: 250px; height: 50px; background: purple"></span> 27 </div> 28 29 </td></tr></tbody></table> 30 31 32 33 </body></html>