flexbox_flex-formatting-interop-ref.html (674B)
1 <!DOCTYPE html> 2 <title>flexbox | flex formatting context :: negative margins and 3 border box</title> 4 <link rel="author" href="http://opera.com" title="Opera Software"> 5 <style> 6 * {margin: 0;} 7 .float { 8 background: lightblue; 9 width: 200px; 10 float: left; 11 } 12 #flex { 13 background: #ffcc00; 14 margin-left: -200px; 15 width: 200px; 16 } 17 div div { 18 border: 2px solid transparent; 19 margin: 0 2em 2em; 20 } 21 p { 22 clear: both; 23 margin: 2em 0; 24 } 25 #nbfc { 26 white-space: nowrap; 27 background: #ffcc00; 28 margin-left: -200px; 29 width: 200px; 30 table-layout: fixed; 31 display: table; 32 } 33 </style> 34 35 <div class="float">float</div> 36 <div id="nbfc"> 37 <div>xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx</div> 38 </div>