floats-wrap-bfc-with-margin-009.tentative.html (782B)
1 <!DOCTYPE html> 2 <link rel="author" title="Oriol Brufau" href="obrufau@igalia.com"> 3 <link rel="help" href="https://drafts.csswg.org/css2/#floats"> 4 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 5 <meta name="assert" content="The BFC root doesn't fit next to the float, so it should be moved below."> 6 <style> 7 .wrapper { 8 width: 100px; 9 background: green; 10 } 11 .float { 12 float: left; 13 width: 50px; 14 height: 50px; 15 background: green; 16 } 17 .bfc { 18 overflow: hidden; 19 width: 100px; 20 height: 50px; 21 margin-left: -50px; 22 background: green; 23 } 24 </style> 25 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 26 <div class="wrapper"> 27 <div class="float"></div> 28 <div style="margin-left: 50px"> 29 <div class="bfc"></div> 30 </div> 31 </div>