hi! i have a problem with completing a task “Design a Feature Selection Page” (CSS part of Full Stack dev course)
after creating a valid code it gives 2 mistakes: “Failed: 13. When the checkbox is checked, the background color of the checkbox should change to a color of your choosing.” and “Failed: 14. When the checkbox is checked, the border color of the checkbox should change to a color of your choosing.”
my code :
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Selection Feature Page</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main>
<h1>Feature Selection</h1>
<div class="feature-card-container">
<h2>External Monitor</h2>
<label class="feature-card">27" Full HD monitor
<input type="checkbox">
</label>
<label class="feature-card">32" 4K monitor
<input type="checkbox">
</label>
</div>
<div class="feature-card-container">
<h2>Working place</h2>
<label class="feature-card">Regular table in open space
<input type="checkbox">
</label>
<label class="feature-card">Private office
<input type="checkbox">
</label>
</div>
<div class="feature-card-container">
<h2>One free drink</h2>
<label class="feature-card">Cappuchino/Latte/Americano
<input type="checkbox">
</label>
<label class="feature-card">Smoothie/Fresh juice
<input type="checkbox">
</label>
</div>
</main>
</body>
</html>
CSS:
body{
font-family: Tahoma, sans-serif;
background-color: rgb(2, 2, 2);
}
h1{
text-align: center;
color: wheat;
}
.feature-card-container{
width: 80%;
border: 1px solid rgb(255, 255, 255);
margin: 10px auto;
padding: 10px;
border-radius: 25px;
background-color: rgb(48, 48, 48);
color: white;
}
.feature-card-container:hover{
background-color: rgb(36, 36, 36);
cursor: pointer;
box-shadow: rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;
}
h2{
text-align: center;
padding: 0;
margin: 10px 0;
color: white;
margin-bottom: 30px;
}
label{
display: block;
text-align: center;
margin-top: 10px;
font-size: 1.1em;
}
input[type="checkbox"]{
appearance: none;
width: 20px;
height: 20px;
cursor: pointer;
border: 2px solid brown;
background-color: white;
border-radius: 5px;
transition: all 0.3s;
vertical-align: middle;
}
input[type='checkbox']:checked {
background-color: brown;
border-color: #2a2a2a;
}
input[type="checkbox"]:checked::after {
content: "✓";
display: block;
text-align: center;
}