Learn CSS Colors by Building a set of colored Markers - Step 23

Hi,

Step 23 of “Learn CSS Colors by Building a set of colored Markers” has the following instructions:

Notice that the background-color for your marker is still red. This is because you set the red value of the rgb function to the max of 255, or 100% red, and set both the green and blue values to 0.

Now use the rgb function to set the other colors.

In the .two CSS rule, use the rgb function to set the background-color to the max value for green, and 0 for the other values. And in the .three CSS rule, use the rgb function to set the background-color to the max value for blue, and 0 for the other values.

Below is my attempt:

h1 {
  text-align: center;
}

.container {
  background-color: rgb(0, 0, 0);
}

.marker {
  width: 200px;
  height: 25px;
  margin: 10px auto;
}

.one {
  background-color: rgb(255, 0, 0);
}

.two {
  background-color rgb(0, 255, 0);
}

.three {
  background-color rgb(0, 0, 255);
}

However I’m failing this step and it’s telling me that " Your .two CSS rule should have a background-color property set to rgb(0, 255, 0) ."

What step am I missing?

Nevermind. I was able to resolve this by erasing and re-typing it. Weird.

1 Like

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