grid-lanes-item-placement-001.html (1153B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: Grid Lanes layout using `grid-column/row`</title> 9 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 10 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 11 <link rel="match" href="grid-lanes-item-placement-001-ref.html"> 12 <style> 13 html,body { 14 color:black; background-color:white; font:25px/1 monospace; padding:0; margin:0; 15 } 16 17 grid { 18 display: inline-grid-lanes; 19 gap: 10px 20px; 20 grid-template-columns: repeat(4,80px); 21 color: #444; 22 border: 1px solid; 23 padding: 2px; 24 } 25 26 item { 27 background-color: #444; 28 color: #fff; 29 padding: 20px; 30 margin: 3px; 31 border: 5px solid blue; 32 } 33 </style> 34 </head> 35 <body> 36 37 <grid> 38 <item style="grid-column:1">1</item> 39 <item>2</item> 40 <item style="margin-top:10px">3</item> 41 <item style="grid-column:span 2">4</item> 42 <item>5</item> 43 <item style="grid-column:3/span 2">6</item> 44 </grid> 45 46 </body> 47 </html>