| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>CSS Grid Layout Reference: a square with a green cross</title> |
| <link rel="author" title="Rachel Andrew" href="mailto:me@rachelandrew.co.uk" /> |
| <style> |
| #grid { |
| width:200px; |
| height: 220px; |
| background-color: green; |
| position: relative; |
| } |
| |
| #grid > div { |
| background-color: silver; |
| width: 90px; |
| height: 90px; |
| position: absolute; |
| } |
| |
| #grid :nth-child(1) { |
| top: 0; |
| left: 0; |
| } |
| |
| #grid :nth-child(2) { |
| top: 0; |
| left: 110px; |
| } |
| |
| #grid :nth-child(3) { |
| top: 130px; |
| left: 0; |
| } |
| |
| #grid :nth-child(4) { |
| top: 130px; |
| left: 110px; |
| } |
| </style> |
| |
| <p>The test passes if it has the same visual effect as reference.</p> |
| <div id="grid"> |
| <div></div> |
| <div></div> |
| <div></div> |
| <div></div> |
| </div> |