gap-008-ltr-ref.html (789B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Flexbox Test: gap - row and column gap</title> 4 <link rel="author" title="Adam Argyle" href="mailto:argyle@google.com"> 5 <style> 6 section { 7 background-color: green; 8 block-size: 100px; 9 display: flex; 10 flex-wrap: wrap; 11 } 12 section > div{ 13 background-color: grey; 14 width: calc(50% - 10px); 15 } 16 section > div:nth-child(1), 17 section > div:nth-child(3) { 18 margin-inline-end: 20px; 19 } 20 section > div:nth-child(3), 21 section > div:nth-child(4) { 22 margin-block-start: 40px; 23 } 24 </style> 25 <body> 26 <p>Test passes if there are <strong>40px horizontal green lines and 20px vertical green lines between boxes</strong>.</p> 27 <section> 28 <div></div> 29 <div></div> 30 <div></div> 31 <div></div> 32 </section> 33 </body>