The Explicit Grid

Report a typo

Create a grid with two rows and four columns, with each column having a fixed width of 100 pixels and each row having a fixed height of 100 pixels. Add a grid gap with a 20-pixel gap between each grid item.

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="grid">
<div class="item">Item 1</div>
<div class="item">Item 2</div>
<div class="item">Item 3</div>
<div class="item">Item 4</div>
</section>
</body>
</html>
Completed 1 of 4
Create four columns, each with a fixed width of 100 pixels
Creates two rows, each with a fixed height of 100 pixels.
___

Create a free account to access the full topic