Place elements

Report a typo

You have a 2x2 grid area in CSS, and you need to place four elements in each cell.

1 2
3 4

Do not use negative values while placing the 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>Place elements</title>
</head>
<body>
<div class="grid-container">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>
</body>
</html>

Completed 1 of 5
Place first item in top-left corner.
Place second item in top-right corner.
___

Create a free account to access the full topic