Basic CSS: Issues changing a variable for a specific area

Objective: Change the value of --penguin-belly to white in the penguin class.

Issue: The penguin class should reassign the --penguin-belly variable to white .

MY CODE:

body {
    background: var(--penguin-belly, #c6faf1);
  }

  .penguin {
    /* Only change code below this line */

    --penguin-belly: white;

    /* Only change code above this line */

The penguin has a white belly but unsure why I keep getting error.

HI @yareli.lora77 !

Welcome to the forum!

It would help to have the full code and link for the challenge so we can test it ourselves.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

It may help if you post the full code. The code you’ve posted so far would pass the challenge, which usually means either:
code not meant to be changed was changed,
or
it’s a browser issue/bug.

Without seeing the rest of the code, I would suggest copy your full code, reset the challenge, then paste your code back in. You can also try other browsers to see if that helps.

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