floats-wrap-bfc-with-margin-008.tentative.html (762B)
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: right; 13 width: 50px; 14 height: 50px; 15 background: green; 16 } 17 .bfc { 18 overflow: hidden; 19 width: 100px; 20 height: 50px; 21 background: green; 22 } 23 </style> 24 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 25 <div class="wrapper"> 26 <div class="float"></div> 27 <div style="margin-right: 50px"> 28 <div class="bfc"></div> 29 </div> 30 </div>