Learn CSS Colors by Building a Set of Colored Markers - Step 23

Tell us what’s happening:
The rgb function does not seem to work for the green and blue markers. I used the same code for the red marker in the previous step and it worked there.

That is,
.one {background-color: rgb(255, 0, 0);} works but

.two {background-color: rgb(0,255,0);} nor
.three {background-color: rgb(0, 0,255);} seem to work.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Colored Markers</title>
    <link rel="stylesheet" href="styles.css">
    <h1>CSS Color Markers</h1>
    <div class="container">
      <div class="marker one">
      <div class="marker two">
      <div class="marker three">
/* file: styles.css */
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);

/* User Editable Region */

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

.three {
  background-color: rgb(0, 0, 225);

/* User Editable Region */

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 Edg/116.0.1938.54

Challenge: Learn CSS Colors by Building a Set of Colored Markers - Step 23

Link to the challenge:

is 225 the max or is it 255?

because for the three class style the directions say
.three CSS rule, use the rgb function to set the background-color to the max value for blue, and 0 for the other values.

1 Like

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