I find it difficult to pass this test. Infact, I really don't understand what I'm asked to do

Tell us what’s happening:
Describe your issue in detail here.

  **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>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 11; TECNO LE6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36

Challenge: Improve Compatibility with Browser Fallbacks

Link to the challenge:

What does the challenge need you to do..Share your code let me see 

Hello @etoomambel , I think they just ask you to put the value red to the background element. before the existing background element. hope this helped. happy coding and welcome to the community. :slightly_smiling_face:

Previous challenges discussed how to create and use a CSS variable.

In this challenge, it is wanting you to add a fallback value (another CSS rule without using a variable) to specify the background color of the element in case the browser can’t find your variable.

In that case, the element would still have a background color declared that it can use instead of your CSS variable.

In CSS, rules declared later in the cascade will override previous rules or inherited rules.

So by adding a rule to specify the background color before your variable, if the browser can’t find your variable, it will use that rule instead. Browsers that support and can find your CSS variable will use that because it will come later in the ruleset.

This is why it is called a fallback. It is like a “plan b” that the browser can use in case the variable doesn’t work.

Wao wao. U guys are so amazing… a_aramini, u are the best. Ling1, ur face show and ur shoe shine. Thanks so much

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