Learn CSS Foundations Projects - CSS Foundations Exercise B

Tell us what’s happening:

Please tell what’s wrong with my code
question: the background of all the odd numbered elements should be yellow
my answer: I gave a common class of “odd” to all the odd elements and set the background-color attribute to value of yellow

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <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">
    <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 class="fourth" id="fourth-element">Number 4 - I'm another ID.</div>
    <p class="odd">Number 5 - I'm a class!</p>
/* file: styles.css */
.odd {
  background-color: yellow;

#second {
  color: blue;
  font-size: 36px;

.third {
  font-size: 24px

.fourth {
  font-size: 24px

  font-weight: bold;
  background: red;

Your browser information:

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

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise B

I don’t think you should remove the classes the elements had, so maybe reset and try again

1 Like

First of all, thanks for the help
elements don’t have any prior classes plus, I didn’t find the reset button or I don’t know how to reset.

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

1 Like

can you see a restart step button, Jessica? I can’t

Usually when you run the test button it show after a while.
But it looks like there is a bug with these challenges

It looks like all of the css foundations lessons have the same bug

Issue was created here

Thank you very much @jwilkins.oboe
I disabled the dark reader extension then submit the solution
It worked for me :slight_smile: