grid-gap-005-ref.html (671B)
1 <!DOCTYPE HTML> 2 <html><head> 3 <meta charset="utf-8"> 4 <title>Reference: nested subgrid</title> 5 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 6 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> 7 <style> 8 html,body { 9 color:black; background-color:white; font:24px/1 Ahem; padding:0; margin:0; 10 } 11 12 span { background:cyan; } 13 span:nth-child(2n+1) { background:grey; } 14 </style> 15 </head> 16 <body> 17 18 <div style="display:inline-grid; grid:100px/100px 0px; gap:100px; border:1px solid;"> 19 <div style="display:grid; grid:100px/140px calc(40px); gap:20px; grid-column:span 2"> 20 <span>a</span><span>b</span> 21 </div> 22 </div> 23 24 </body> 25 </html>