Help me please with this part

Tell us what’s happening:
so im trying to do this but dont know how
It looks like a variable is being used to set the background color of the .red-box class. Let’s improve our browser compatibility by adding another background declaration right before the existing declaration and set its value to red.
any idea how to do this?
Your code so far


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

Where is your code? Show us what you’ve tried please.

That is what ive tried basically i cant find out the code and i cant post the link to the challenge so someone can show me.its css 68 challenge, btw this is first time ive done this title is Improve Compatibility with Browser Fallbacks

Okay, so what you’ve posted is the code from the lesson. I don’t see where you’ve put in your code so let’s take it from there. The instructions say;

What this is saying is that the box shown, which has a class of ‘red-box’ is being styled using a variable. Not all browsers understand a variable though so you are tasked with adding a background declaration and setting its value to red.
There is a blank line in the ‘red-box’ class where you can add this declaration and value.

1 Like