Tell us what’s happening:
Your code so far
<style>
:root {
--red-color: red;
}
.red-box {
background-color: red;
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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
.
ilenia
March 13, 2019, 11:23am
#2
You should have only one selector for .red-box
please, can you explain further because i don’t understand
ilenia
March 13, 2019, 11:51am
#4
You already have the .red-box
selector , you need to add there the fallback css rule, not create a new block for the same selector
thank you for the reply so far,i just tried this;
.red-box {
background-color : #FF0000 ;
background: var(–red-color, red);
height: 200px;
width:200px;
but i still can’t debug it
ilenia
March 13, 2019, 2:09pm
#6
you are asked to still use red
keyword to create the fallback rule
also, you will need to use the shorthand background
instead of background-color
zacc
March 15, 2019, 6:12am
#7
I have the same problem. I’ve texted everything like as in the assignment, but it isn’t work/ What’s wrong?
ilenia
March 15, 2019, 6:26am
#8
You don’t have to use the variable
Both your background color rules are useless if the browser doesn’t use variables
samliks
March 15, 2019, 10:59am
#10
thank you zacc,have seen the mistake