Stuck on challenge! need assistance!

Stuck on challenge! need assistance!
0

#1

Tell us what’s happening:
I am having an issue with this challenge. any tips would be greatly appreciated!

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 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/improve-compatibility-with-browser-fallbacks


#2

On the empty space, you want to give a background color of red. Notice that the line after it has

background: var(--red-color);

The first half of it is fine, it’s the var(--red-color) that some browsers may not understand. If you give it red in the standard way on the line before, the problem browsers will read that and just ignore the next line, but for browsers that can understand browser variables, the next line will override. It’s not the most practical example, but it gets the point across.

So, set the background color two red on that line before, without using a css variable.

Let us know if this is not enough of a hint.


#3

Im not sure if I am over thinking this or, if this is something from a previous lesson that I’m just not remembering. :thinking:


#4

Maybe. Or maybe not. I haven’t been through that part of the curriculum, but they sometimes move quickly and the new curriculum is still being polished. Don’t worry if you missed something because it may not have been explained well enough. FCC is not an exhaustive source - you’re expected to consult outside sources.

Was the explanation of the task sufficient? Are you getting it now?


#5

It defiantly seems sufficient enough. Though my issue is I am very new to this and I’ve been taking notes to try and have something to look back on but I am stuck at the moment. This is the first lesson that there hasn’t been a “Watch Video” tab as well. when I click on “get a hint” it gives me a (404 Page Not Found).


#6

Well, they are still working out some bugs. But you definitely shouldn’t feel bad that you couldn’t figure it out. Part of learning to be a dev is learning to struggle to figure things out. I’ve been working as a dev for over a month now and I am constantly having to go to docs and google to figure things out. Things in the real world aren’t always explained well and usually there aren’t videos. Try to solve it. If you need to, back up and see if you missed something. If not, check google. If that doesn’t work, ask a forum (in this case, us). That’s how it works. Just keep at it - it will get easier.


#7

I appreciate the help as well as the advice! I’m glad there is people like you here that WANT to help others! ill be sure to let you know when I complete the lesson.


#8

Just needed some sleep. Woke up and re- read the challenge and got it solved!