Freecodecamp: [beta] correct code not accepted

Created on 14 Feb 2017  路  7Comments  路  Source: freeCodeCamp/freeCodeCamp


Challenge Name

http://beta.freecodecamp.com/en/challenges/basic-css/change-the-color-of-text

Issue Description

When using inline style to change the h2 element to the color red, my output says "try again" and that I need to change the h2 color to red. I have tried both inline style and using style tags.

UPDATE: this also occurred a few challenges later, when directed to change h2 elements to 'blue' using CSS. Could possibly be an issue with the rest of the 'Basic CSS' section.

Browser Information

  • Browser Name, Version: Firefox version 51.0
  • Operating System: Windows 10
  • Mobile, Desktop, or Tablet: Desktop

Your Code

<style>
  h2 {
    color: red;
  }
</style>
<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

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

  <div>
    <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><br>
    <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><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>




Screenshot

screenshot 30
screenshot 31

Most helpful comment

I've run into this same problem on some of the tests. What I've seen is that if incorrect code is submitted first, and then corrected, the correct code doesn't pass the tests. When the page is reloaded, the FCC site pulls in the last submitted code (the corrected code), and the tests pass without code modification.

All 7 comments

Code is fine try to do it in a different browser. I also faced same difficulties but now it works fine on chrome

Confirmed the code is accepted on latest version of Chrome. Must be an issue with Firefox.

I've run into this same problem on some of the tests. What I've seen is that if incorrect code is submitted first, and then corrected, the correct code doesn't pass the tests. When the page is reloaded, the FCC site pulls in the last submitted code (the corrected code), and the tests pass without code modification.

@elrolfe That's a good description of what I think is happening as well.

Another thought of why this issue might be happening is that jQuery's .css() method doesn't work properly in Firefox. Funny enough, the test for this challenge happens to use that exact method :stuck_out_tongue:

$("h2").css("color") === "rgb(255, 0, 0)"

Also seeing this issue in the Add a Submit Button to a form page in Chrome.

URL: https://www.freecodecamp.com/challenges/add-a-submit-button-to-a-form
submitbuttonissue

The last line has the code for the button. The phone is displaying a button. It just doesn't like my button code.

Hi @flowerboy777 Thank you for reporting this issue.

This is an issue with CSS tests in Firefox. The main issue is #10749 This is a big issue that affects a lot of people. For now, you'll have to switch to Chrome for any challenges with CSS tests in the beta.

Happy coding!

@jawkneew8 This is a different issue. Your button is not inside your form.

Thanks for reporting and investigating everyone! As mentioned before in this issue, we're having issues with CSS tests in Firefox. If you run into a CSS test that doesn't pass, please try running it in Chrome or Safari (we're having some issues with tests in Edge as well). We're working on resolving this.
I'm closing this issue as a duplicate of #10749

Was this page helpful?
0 / 5 - 0 ratings