This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

209 points
Ec5c9f7f6c8f1c4995a99c9a4d527f62?s=140&d=retro
Submitted by
ivette sanchez
about 2 years ago

It keeps saying Oops, try again. Did you remember to make your h1 font-family Verdana? PLEASE HELP!!

p{
color:purple;
}
h1{
font-family:Verdana;
}
h3{
font-family:Courier;
}


0 votes

permalink

I tried your code in a windows 8.1 IE11 environment and got a pass....
Try following for your index.html
maybe your Browser resets the font-family setting.

<!DOCTYPE html>
<html>
    <head>
        <!--Add your link tag here!-->
        <link type="text/css" rel="stylesheet" href="stylesheet.css" /> 
        <title>Result</title>
    </head>
    <body>
        <h1 id="elementIdHere">Change me to Verdana.</h1>
        <h3>Change me to Courier.</h3>
        <p>Make me purple!</p>
        <p class='test'><p>
        <script>
        var elt = document.getElementById("elementIdHere");
        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>

3658 points
5334fc819c4e9db930001a0d_32139218
Submitted by
Leon
about 2 years ago