Step 12. ID, please! ... giving me trouble


#1


https://www.codecademy.com/courses/web-beginner-en-WF0CF/2/3?curriculum_id=50579fb998b470000202dc8b


Error message is "Oops, try again. Did you set the font-family of the #serious ID to Courier?".

The code behaves just fine, but the error message continues to block me from proceeding. Help! :slight_smile:

HTML:

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>Result</title>
    </head>
    <body>
        <!--Add your HTML elements with the ID "serious" below!-->
      <ol id="serious">
        <li>All of these are serious!</li>
        <li>Even this 2nd one... </li>
      </ol>
      <p>This paragraph is NOT serious and thus is default color, font, etc. ....</p>
    </body>
</html>


CSS:
 /*Define your CSS id #serious below!*/
 #serious {
     color: #cc0000;
     font-family: Courier;
 }


#2

@jeffkan1,
I used your HTML code
and integrated the course-checker test

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>Result</title>
    </head>
    <body>
        <!--Add your HTML elements with the ID "serious" below!-->
      <ol id="serious">
        <li>All of these are serious!</li>
        <li>Even this 2nd one... </li>
      </ol>
      <p>This paragraph is NOT serious and thus is default color, font, etc. ....</p>
        <p class="test"></p>

	<script>
	var elt = document.getElementById("serious");
    var out = "";
    var st = elt.style;
    var cs = window.getComputedStyle(elt, null);
    for (x in st) {
      if ( x.indexOf('fontFamily',0) !== -1) {
        out += "  " +
        x + " = '" + st[x] +
        "' > '" + cs[x] + "'\n";
      }
    }
    $('.test').text(out)
	</script
	</body>
</html>

and i got a pass using windows 8.1 IE11

Maybe instead of using an ol-tag
you could try using a p-Tag like
<p id="serious">ttttt</p>


#3

Leonard thanks so much for taking a look! Appreciate it. I tried it today and the error message is no more. A big thank to the folks that create these lessons on fixing it so quickly.

Jeff


#4

@jeffkan1
( keep in mind )
What you should know
is if you make a HTML change
it is recommended to do a refresh Browser....

++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom