Hey all, I am doing the Specificity CSS design challenge and I feel like I got the correct answer but it is not giving me credit. It showed that I should have used another style rule.
The task:
Add a ruleset in style.css to make the opacity of the paragraph, containing the text, “What will it be?”, equal to 0.5
— the only element that should change is the second <p>
.
The idex.html
<!DOCTYPE html>
<html>
<head>
<title>Specificity</title>
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body>
<section>
<h1>Specificity</h1>
<p> Edit the CSS rules and change the "What will it be?" content as specified in the instructions.</p>
<p id="question">What will it be?</p>
</section>
</body>
</html>
My CSS answer
section {
font-family: "Helvetica Neue", Helvetica, Sans-serif;
background-color: #5B9279;
padding: 5em 3em;
color: #EAE6E5;
}
h1 {
font-size: 50px;
font-weight: bold;
}
p {
font-size: 25px;
}
#question {
color: rgba(234, 230, 229, 0.5);
}
The answer is apparently “opacity: 0.5”
however, I thought that the lessons explained that using opacity was not always best.