Tell us what’s happening:
It keeps telling me I need to had class “box1” to first div with class box. I think that is what I am doing so I’m not sure what the issue is.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Colored Boxes</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<h1>Colored Boxes Layout</h1>
</header>
<div class="flex-container">
<!-- User Editable Region -->
<div class="box" class="box1">
<!-- User Editable Region -->
<h2>Box 1</h2>
<p>Red</p>
</div>
<div class="box">
<h2>Box 2</h2>
<p>Orange</p>
</div>
<div class="box">
<h2>Box 3</h2>
<p>Yellow</p>
</div>
<div class="box">
<h2>Box 4</h2>
<p>Green</p>
</div>
<div class="box">
<h2>Box 5</h2>
<p>Blue</p>
</div>
<div class="box">
<h2>Box 6</h2>
<p>Indigo</p>
</div>
</div>
</body>
</html>
/* file: styles.css */
h1 {
text-align: center;
margin-bottom: 10px;
}
.box {
max-height: 120px;
color: #000;
border: 1px solid #000;
display: flex;
flex: 0 0 150px;
flex-direction: column;
align-items: center;
margin: 10px;
font-weight: bold;
font-size: 1.125rem;
border-radius: 5px;
order: 0;
}
.flex-container {
display: flex;
flex-wrap: wrap;
width: 70%;
height: 600px;
padding: 10px;
margin: 20px auto;
align-content: space-evenly;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Challenge Information:
Design a Set of Colorful Boxes - Step 32