Asic CSS: Improve Compatibility with Browser Fallbacks

Asic CSS: Improve Compatibility with Browser Fallbacks
0

#1

<style>

:root {

–red-color: red;

}

.red-box {

background-color : red;

background: var(–red-color);

height: 200px;

width:200px;

}

</style>

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


#2

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


#3

no its not working, i have tried this also.


#4

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.