Write CSS code to center the grid items horizontally, then align the elements vertically, evenly pushing them to the edges.
Grid alignment: content
Align the grid content
Report a typo
Write HTML and CSS code
<!DOCTYPE html>
<html>
<head>
<title>Grid elements</title>
</head>
<body>
<div class="grid-container">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</body>
</html>
Completed 0 of 2
Align the elements to the center horizontally
Align the elements vertically evenly pushing them to the edges
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.