flex-001.htm (1392B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: The 'flex' shorthand adjusting the 'flex-grow' sub-property</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-property" /> 7 <link rel="match" href="reference/justify-content-001-ref.html"> 8 <meta name="assert" content="This test checks that the flex grow factor determines the distribution of positive free space."/> 9 <style type="text/css"> 10 #flexbox 11 { 12 background-color: red; 13 display: flex; 14 width: 300px; 15 } 16 div div 17 { 18 background-color: orange; 19 flex: 1 0 auto; 20 height: 100px; 21 } 22 #flexItem1 23 { 24 background-color: blue; 25 } 26 </style> 27 </head> 28 <body> 29 <p>Test passes if there is a single blue rectangle on the left, a single orange rectangle directly to its right, and there is no red visible on the page.</p> 30 <div id="flexbox"> 31 <div id="flexItem1"></div> 32 <div></div> 33 </div> 34 </body> 35 </html>