Asic CSS: Improve Compatibility with Browser Fallbacks


:root {

–red-color: red;


.red-box {

background-color : red;

background: var(–red-color);

height: 200px;




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

Use background instead of using background-color. Both should work fine in the browser, but the challenge tests accept only the first option.

1 Like

no its not working, i have tried this also.

Please go to the challenge windows and click on “reset all code”. Then make sure you type your code in the challenge window or in any code editor.

You’re using smart quotes here <div class=“red-box”></div> instead of the default double quotes, like that: ".

You’re also not using standard “-” (minus key).

CSS variables contains two minus key before their name, so it is --red-color: red;.

Hope this helps.