Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give Background Color to Div Element Not Accepting Correct Answer #10535

Closed
LukaszKolo opened this issue Sep 9, 2016 · 26 comments
Closed

Give Background Color to Div Element Not Accepting Correct Answer #10535

LukaszKolo opened this issue Sep 9, 2016 · 26 comments

Comments

@LukaszKolo
Copy link

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.

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
 .red-text {
   color: red;
 }

 h2 {
   font-family: Lobster, Monospace;
 }

 p {
   font-size: 16px;
   font-family: Monospace;
 }

 .thick-green-border {
   border-color: green;
   border-width: 10px;
   border-style: solid;
   border-radius: 50%;
 }

 .smaller-image {
   width: 100px;
 }

 .silver-background {
   background-color: silver;
 }

</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></a>

<div class="silver-background">
 <p>Things cats love:</p>
 <ul>
   <li>cat nip</li>
   <li>laser pointers</li>
   <li>lasagna</li>
 </ul>
 <p>Top 3 things cats hate:</p>
 <ol>
   <li>flea treatment</li>
   <li>thunder</li>
   <li>other cats</li>
 </ol>
</div>

<form action="/submit-cat-photo">
 <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
 <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
 <label><input type="checkbox" name="personality" checked> Loving</label>
 <label><input type="checkbox" name="personality"> Lazy</label>
 <label><input type="checkbox" name="personality"> Energetic</label>
 <input type="text" placeholder="cat photo URL" required>
 <button type="submit">Submit</button>
</form>
     ```
@erictleung
Copy link
Member

erictleung commented Sep 9, 2016

@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.

@erictleung erictleung added the status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. label Sep 9, 2016
@LukaszKolo
Copy link
Author

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

@LukaszKolo
Copy link
Author

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

The second element is not fullfilled

@LukaszKolo
Copy link
Author

@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.

@erictleung
Copy link
Member

@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 erictleung changed the title Bug Give Background Color to Div Element Not Accepting Correct Answer Sep 9, 2016
@LukaszKolo
Copy link
Author

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

@hantsy
Copy link

hantsy commented Sep 9, 2016

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

@dhcodes dhcodes added confirmed and removed status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. labels Sep 9, 2016
@divyaprakashpoddar
Copy link

I am facing a similar problem

@LukaszKolo
Copy link
Author

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

@andreiamlm
Copy link

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

@LukaszKolo
Copy link
Author

Opera, IE maybe then?

@andreiamlm
Copy link

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

@andreiamlm
Copy link

Got it to work only on Edge.

@dnesry
Copy link

dnesry commented Sep 16, 2016

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

@dnesry
Copy link

dnesry commented Sep 16, 2016

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

@praneeth65
Copy link

<style> .red-text { color: red; } div .background-color{background-color:silver;} h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } .thick-green-border { border-color: green; border-width: 10px; border-style: solid; border-radius: 50%; } .smaller-image { width: 100px; } </style>

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
Indoor Outdoor Loving Lazy Energetic Submit

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.

@alexiss23
Copy link

alexiss23 commented Jan 17, 2017

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.

@systimotic
Copy link
Member

Closing in favour of #10749

@Mac1281
Copy link

Mac1281 commented Feb 7, 2017

Make sure you spelled everything correct.

@jacob-aifuding
Copy link

thank you @martian1431 see you answered i did it

@Brandonpeops88
Copy link

Brandonpeops88 commented Feb 15, 2017

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!"

@aravind0990
Copy link

Thanks @alexiss23 !! you saved my time :)

@Spikatrix
Copy link

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

@DataScientist44
Copy link

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.

@IrishMalaca
Copy link

image

@AndreyAzimov
Copy link

AndreyAzimov commented Oct 26, 2017

Don't work on my site as well :(

<style>

.silver-backgroung {
background-color: silver;
}

.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}

</style>

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
Indoor Outdoor
Loving Lazy Energetic
Submit

@freeCodeCamp freeCodeCamp locked and limited conversation to collaborators Oct 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests