I am stuck here!

SOLUTION IS NOT THE ANSWER!!!

I have checked numerous forums, and questions however none of the solutions have helped or worked. I have the exact same code that the hint and other solutions have, but I can not pass this challenge. Please help! My solution code is below.

:root { --red-color: red; } .red-box { background: red; background: var(--red-color,) height: 200px; width:200px; }
  **Your code so far**

<style>
:root {
  --red-color: red;
}
.red-box {
  background: red; 
  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/90.0.4430.212 Safari/537.36

Challenge: Improve Compatibility with Browser Fallbacks

Link to the challenge:

I’m not sure what you mean by “exact same code”. Can you show me the solution that has this line?

  background: var(--red-color,)

I don’t know what that comma is doing there and CSS requires a semicolon at the end.

When I fix that, your code passes for me. If you still can’t pass after fixing those, then make sure you are not in dark mode - that can screw up color based tests.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.