grid-lanes-item-placement-003.html (1170B)
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` and `dense`</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-003-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-auto-flow: dense; 21 grid-auto-columns: 80px; 22 color: #444; 23 border: 1px solid; 24 padding: 2px; 25 } 26 27 item { 28 background-color: #444; 29 color: #fff; 30 padding: 20px; 31 margin: 3px; 32 border: 5px solid blue; 33 } 34 </style> 35 </head> 36 <body> 37 38 <grid> 39 <item style="grid-row:-100">1</item> 40 <item>3</item> 41 <item style="grid-column:foo 2; grid-row:span 2">2</item> 42 <item style="grid-column:span 3">4</item> 43 <item>5</item> 44 <item>6</item> 45 </grid> 46 47 </body> 48 </html>