Gildas
1
Tell us what’s happening:
Your code so far
<style>
:root {
--red-color: red;
}
.red-box {
background:
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/87.0.4280.141 Safari/537.36
.
Challenge: Improve Compatibility with Browser Fallbacks
Link to the challenge:
sitek94
2
You have an empty property:
background:
background: var(--red-color);
Gildas
3
i tried putting red there but it didnt work so please work can i do just ignore the property and see it like ther is nun please work can i do
sitek94
4
Can you show your code? Maybe there is a little bug hidden
It works for me, so if you’re sure everything is fine maybe try resetting the challenge.
Gildas
5
all the codes are up you can check it out
sitek94
6
The code that you sent is wrong. You have an empty background
property there. It needs a value.
Your .red-box
rule should include a fallback with the background
set to red immediately before the existing background
declaration.
Here:
background: your-value;
background: var(--red-color);
Gildas
7
i just posted a new one go see thats the way the code came
Gildas
8
Tell us what’s happening:
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
.
Challenge: Improve Compatibility with Browser Fallbacks
Link to the challenge:
You can add a fallback like this
.red-box {
background:red;
background: var(--red-color);
height: 200px;
width:200px;
}
Also do read this article for better understanding
Gildas
10
thanks bro it is ok now was my fault i didnt run my code (
system
Closed
11
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.