CSS Foundations Exercise B

Hello everyone,
I tried not to ask this early, but I really need help with this.
I’ve tried everything to solve this question:

    1. The fourth element should have a font-size of 24px.
      But it won’t budge!
      What should I do first?
      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">
    <style>
      .odd {
      background-color: yellow;
      }
      .third {
        font-size: 24px;
      }
    </style>
  </head>
  <body>
    <p class="odd">Number 1 - I'm a class!</p>
    <div id="second">Number 2 - I'm one ID.</div>
    <p class="odd third">Number 3 - I'm a class, but cooler!</p>
    <div id="fourth">Number 4 - I'm another ID.</div>
    <p class="odd">Number 5 - I'm a class!</p>
  </body>
</html>

CSS:

#second {
  color: blue;
  font-size: 36px;
}
.third {
  font-size: 24px;
}
#fourth {
  font-size: 24px;
  background-color: red;
  font-weight: bold;
}

Link(s):

Please respond as simply and as soon or as late as you want.
I don’t care if I don’t get any response, I just want it to be in the right spot. Okay, I do care a little.

This is where I add the fourth element’s ID by the way.

Hi @fdjskalfds

Please read the instructions carefully.

The font-size of the fourth element should be set with a class attribute.

Happy coding

Thank you for your help @Teller!

Man, first a typo, now something simple as this? :dotted_line_face:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.