flexbox_justifycontent-center-overflow.html (1129B)
1 <!DOCTYPE html> 2 <title>flexbox | justify-content: center / overflow</title> 3 <link rel="author" href="http://opera.com" title="Opera Software"> 4 <link rel="author" href="mailto:dgrogan@chromium.org" title="David Grogan"> 5 <link rel="help" 6 href="http://www.w3.org/TR/css-flexbox-1/#justify-content-property"> 7 <meta name="assert" content="Items that overflow a singleline justify-content:center flexbox container are positioned correctly."> 8 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/resources/check-layout-th.js"></script> 12 13 Blue is the flexbox. Orange are items that overflow it. 14 15 <style> 16 .flexbox { 17 background: blue; 18 margin-left: 50px; 19 height: 150px; 20 width: 50px; 21 display: flex; 22 justify-content: center; 23 position: relative; 24 } 25 span { 26 background: orange; 27 margin: 10px; 28 flex: 1 0 40px; 29 } 30 </style> 31 32 <div class=flexbox> 33 <span data-expected-width=40 data-offset-x=-55></span> 34 <span data-expected-width=40 data-offset-x=5></span> 35 <span data-expected-width=40 data-offset-x=65></span> 36 </div> 37 38 <script> 39 checkLayout('span'); 40 </script>