Tell us what’s happening:
The .color5 element should have a background color set. What is wrong with my background color set? Can someone assist?
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>
<h1>Boxes in Color</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;
}
.color-box {
width: 80px;
height: 80px;
margin: 20px;
padding: 10px;
border-radius: 4px;
box-align: center;
}
.color-box.color1 {
background-color: #3B7E20CC;
}
.color-box.color2 {
background-color: rgb(127, 0, 0);
}
.color-box.color3 {
background-color: cyan;
}
.color-box.color4 {
background-color: hsl(223, 59%, 31%);
}
.color-box.color5 {
background-color: rgb(222, 0, 222);
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0
Challenge Information:
Design a Set of Colored Boxes - Design a Set of Colored Boxes