Freecodecamp: Give Background Color to Div Element Not Accepting Correct Answer

Created on 9 Sep 2016  路  26Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge give-a-background-color-to-a-div-element has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.

`````` html


CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
 ```

``````

Most helpful comment

right

You forgot to add one more step to this question. The last question states: "Your div element should have a silver background."
Apply
.silver-background {
background-color: silver;
}
To the styles area in order to assign the class the Silver color.

All 26 comments

@LukaszKolo thanks for the issue but can you be more specific on what bug you are experiencing? Your code is correct so I'm not sure how to help you.

So thats a problem, that code is correct :) and the program says its not correct

"Give your div element the class silver-background.
Your div element should have a silver background."

The second element is not fullfilled

@erictleung Any ideas what to do with this problem?

  • the code is correct as you said,
  • DIV has a silver background color,
  • first checkbox "Give your div element the class silver-background" is checked green,
  • the second "Your div element should have a silver background." is red, so I couldnt go further with the course.

@LukaszKolo I would either suggest trying a different browser or jump to a different challenge by navigating through the Challenge Map. I'm not sure how to reproduce your issue. But it looks like you're using Firefox. I'm unable to reproduce your issue on Chrome. Let's see if someone else is able to reproduce the issue on Firefox.

@erictleung thank you very much :) ill try this way

I encountered the same problem in the latest Firefox 64 bit, Windows 10 64bit 1607.

I am facing a similar problem

Try freecode with Google Chrome. I passed this challenge with Chrome.

I'm facing the same issue on Google Chrome browser on an Android.

Opera, IE maybe then?

I've tried Chrome on Android, Chrome on win 10, and now Firefox. =(

Got it to work only on Edge.

I am using Edge and background does not turn silver, and I have the same code as shown above

Never mind - did a reset and typed in everything again manually instead of copying and pasting - worked!

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats

i mentioned it in css style and wrote the class more precisely and i am still not able to change my background color, and i use chrome.

right

You forgot to add one more step to this question. The last question states: "Your div element should have a silver background."
Apply
.silver-background {
background-color: silver;
}
To the styles area in order to assign the class the Silver color.

Closing in favour of #10749

Make sure you spelled everything correct.

thank you @Martian1431 see you answered i did it

Thankyou @alexiss23!

I was too busy trying to assign the background class to my "div" element within the style tags above but overlooked the need to add it within the "div" tags below. . I have to keep reminding myself, "as above, so below!"

Thanks @alexiss23 !! you saved my time :)

Reproducible in Chrome for Android (latest version, 58.0.3029.83 as of now).

Mine does NOT work in latest Firefox. DOES work in latest Chrome. I ran it in Chrome and then went back to Firefox to carry on.

image

Don't work on my site as well :(


CatPhotoApp


Click here to view more cat photos.

A cute orange cat lying on its back.


Things cats love:



  • cat nip

  • laser pointers

  • lasagna


Top 3 things cats hate:



  1. flea treatment

  2. thunder

  3. other cats













Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaphnisM picture DaphnisM  路  3Comments

ar5had picture ar5had  路  3Comments

robwelan picture robwelan  路  3Comments

vaibsharma picture vaibsharma  路  3Comments

itsmikewest picture itsmikewest  路  3Comments