Design a Set of Colored Boxes - Design a Set of Colored Boxes

Tell us what’s happening:

My 3. and 4. are wrong but I don’t really understand why. There are 5 div elements and they are all named like in the example given.

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">
    <link href="styles.css" rel="stylesheet">
    <title>Colored Boxes</title>
</head>
<body>
    <h1> Color Boxes </h1>
        <div class="color-grid">
            <div class="color-box color1"></div>
            <div class="color-box color2"></div>
            <div class="color-box color3"></div>
            <div class="color-box color4"></div>
            <div class="color-box color5"></div>
        <div>
</body>
</html>
/* file: styles.css */
body{
  background-color: #f4f4f4
}
h1 {
  text-align: center;
  font-size: 45px;
}

.color-box {
  width:100px;
  height: 100px;
  border-radius: 10px;
  display: inline-block;
  margin: auto 10px;
}

.color1 {
  background-color: #F4D2AAFF;
}

.color2 {
  background-color: rgb(200, 150, 200);
}

.color3 {
  background-color: lightblue;
}

.color4{
  background-color: hsl(95, 60%, 80%, 1);
}

.color5 {
  background-color: hsl(240, 60%, 70%, 1);
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0

Challenge Information:

Design a Set of Colored Boxes - Design a Set of Colored Boxes

look here, see if you find something that needs fixing

2 Likes

Yeah i figured right after posting, but it was pending so i couldn’t delete :slight_smile: thanks anyways

1 Like