Learn CSS Foundations Projects - CSS Foundations Exercise B

Tell us what’s happening:

I´ve completed all the tasks of the exercise, but for some reason still appearing this check without being completed: Failed:The fourth element should have a font-size of 24px.
If you check my code you´ll see that I put this part on my css code.

So, I hope someone has the answer.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Class and ID Selectors</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <p class="num-1">Number 1 - I'm a class!</p>
    <div id="primer-id">Number 2 - I'm one ID.</div>
    <p class="num-2"> - I'm a class, but cooler!</p>
    <div id="seg-id">Number 4 - I'm another ID.</div>
    <p class="num-3">Number 5 - I'm a class!</p>
  </body>
</html>
/* file: styles.css */
.num-1 {
  background-color:yellow;


}

#primer-id {
  color: blue;
  font-size: 36px;

}

.num-2 {  
font-size: 24px;
background-color:yellow;

}

.num-3 {
  background-color:yellow;

}

#seg-id {
  font-size: 24px;
  background-color: red;
  font-weight: bold;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise B

Maybe you are not respecting this part of the user stories?

The font-size of the fourth element should be set with a class attribute. The font-weight and the color should be set with an id attribute.

Totally right Ilenia, I´ve forgot that I could link a ID and a class on the same div. Thanks for your quick response :slight_smile: .