HELP? please with this

Tell us what’s happening:

Your code so far


<style>
  :root {
    --red-color: red;
  }
  .red-box {
    
    background: var(--red-color);
    height: 200px;
    width:200px;
  }
  .red-box {
    
    background: var(--red-color);
    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/70.0.3538.110 Safari/537.36.

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

" Let’s improve our browser compatibility by adding another background declaration right before the existing declaration and set its value to red."

This is the challenge request. So on the empty line before background: var(--red-color); you need to add another background declaration.

1 Like

can you give me the code please

can you give me the code please

All the code you need its already in the request. Just read it carefully.

just before background: var(–red-color) declare a NEW BACKGROUND EASY PESY

 

:root {

--red-color: red;

}

.red-box {

background: red; /*This line of code is the solution*/

background: var(--red-color);

height: 200px;

width: 200px;

}

basically the browser which does not understand second one will take first and which understands it would take second as the document flow from top to bottom and last one overrides rest if it is going to change the same data.