It is showing unecessary error in blue and red class while adding background color

Tell us what’s happening:
What’s wrong with my code is simple and easy to understand but the compiler is asking for blue and yellow color to be mentioned in the block.

Your code so far


<style>
body {
  background-color: #FFFFFF;
}
.blue {
  background-color: blue;
}
.yellow {
  background-color: yellow;
}
div {
  display: inline-block;
  height: 100px;
  width: 100px;
}
</style>
<div class="blue"></div>
<div class="yellow"></div>

Your browser information:

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

Challenge: Learn about Complementary Colors

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/learn-about-complementary-colors

Instead of the color value “blue” and “yellow” provide the hexadecimal color value. The values are shown in the tutorial section on the left of the coding section.

Did the same but its showing the same error :frowning:

1 Like

Please show me the error?

Please show me your current code also?

The <div> elements with classes blue and yellow should have respective colors as background-color values.

<style>
  body {
    background-color: #FFFFFF;
  }
  .blue {
    background-color: #0000FF;
  }
  .yellow {
    background-color: #FFFF00;
  }
  div {
    display: inline-block;
    height: 100px;
    width: 100px;
  }
</style>
<div class="blue"></div>
<div class="yellow"></div>

This is what I did in the code given by me

I met same problem… what should I do now?

As this topic has been inactive for more than a year I am going to close it. If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.