Solution to this please,

Tell us what’s happening:

Your code so far


<style>
  :root {
    --red-color: red;
  }
  .red-box {
    background: --red-color: red;
    height: 200px;
    width:200px;
  }
</style>
<div class="red-box"></div>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/improve-compatibility-with-browser-fallbacks

So, the request is:
" add another background declaration right before the existing declaration and set its value to red."

The code provided:

  .red-box {
    
    background: var(--red-color);//right before this line
    height: 200px;
    width:200px;
  }

you just need to provide an alternative to this line:

background: var(–red-color);

so above the line just write this:
background: red;

thanks, tried it still not working

please show us the code you have tried.

1 Like

<style>

:root {

–red-color: red;

}

.red-box {

background:red;

background: --red-color: red;

height: 200px;

width:200px;

}

</style>

<div class=“red-box”></div>

thank you, i just pasted it above.

This is shouldn’t have been changed. Make sure you reset your code before trying what was suggested above.

okay thanks, will try it

thank you so much, it has worked…