Hi there,
I’m new to coding, and starting with the basic lessons of FreeCodeCamp.
I’m stuck in a lesson, and the “Hint” button leads me to a wonderful 404 page, so no help there.
In that lesson, I’m asked to change things on my ‘.red-box class’. I should add another background
declaration right before the existing declaration and set its value to red.
As follows is the code I’m given to work on:
<style>
:root {
--red-color: red;
}
.red-box {
background: var(--red-color);
height: 200px;
width:200px;
}
</style>
<div class="red-box"></div>
I’ve tried several options to get the ‘Fallback’ right, but when I run the test, it tells me that I haven’t “included a fallback with the background
set to red immediately before the existing background
declaration.”
I don’t get it, and would really appreciate your help
Here’s what I tried:
background: color: red, var(--red-color);
background: red, var(--red-color);
background-color: red, var(--red-color);
background: #F00, var(--red-color);
background-color: red;
background: var(--red-color);
And I also tried in the :root to add a color there, cause why not :
:root {
color: red;
--red-color: red;
}
Thanks for your help!
Joan.