Center of a cell

Report a typo

You're given a 3x3 grid area in CSS. You have to place the "center" element in the center cell using the grid-area CSS property.

[ALERT]Do not use negative values while placing the item.[/ALERT]

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>Center</title>
</head>
<body>
<div class="grid-container">
<div class="grid-item">Center</div>
</div>
</body>
</html>


Completed 1 of 2
Place the center element in the center cell of the grid container.
The code is valid.

Create a free account to access the full topic