flex-margin-no-collapse-ref.html (639B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Flexible Box Reference File</title> 5 <link rel="author" title="Ping Huang" href="mailto:phuangce@gmail.com" /> 6 <style type="text/css"> 7 #container { 8 position: absolute; 9 top: 100px; 10 left: 10px; 11 width: 200px; 12 height: 300px; 13 } 14 15 .box { 16 width: 100px; 17 height: 100px; 18 background-color: green; 19 } 20 21 #box1 { 22 margin: 50px 0; 23 } 24 25 #box2 { 26 margin: 100px 0; 27 } 28 29 </style> 30 </head> 31 <body> 32 <p>The test passes if there are two green boxes and no red.</p> 33 <div id="container"> 34 <div id="box1" class="box"></div> 35 <div id="box2" class="box"></div> 36 </div> 37 </body> 38 </html>