Apply <code>grid-template-areas</code>

Report a typo

Using grid-template-areas, create the layout and apply the grid-area property to the respective grid area items.

"header header header"
"nav main sidebar"
"footer footer footer"
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>Grid template areas</title>
</head>
<body>
<div class="grid-container">
<div class="grid-item header">Header</div>
<div class="grid-item nav">Nav</div>
<div class="grid-item main">Main</div>
<div class="grid-item sidebar">Sidebar</div>
<div class="grid-item footer">Footer</div>
</div>
</body>
</html>






Completed 1 of 7
Apply the grid template areas to the grid container
Apply gird area to the header element.
___

Create a free account to access the full topic