CSS Treehouse Club: CSS My First Web Page Color Keywords, Hex Colors, and Font Families

Michael Welker
PRO
Michael Welker
Pro Student 1,117 Points

Font Doesn't Change Regardless of HTML and CSS Code

Regardless of what I type or paste into the editor for font, the preview font never changes. Even when using the default font that the exercise starts with, "Open Sans," the font displayed is a serif font, not sans serif. That same serif font never changes, regardless of what is typed. Here is the code.

HTML

<head> <meta charset="utf-8"> <title>Link's Page</title> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel="stylesheet" type="text/css"> <link href="style.css" rel="stylesheet"> </head>

CSS

body { max-width: 600px; margin: 0 auto; padding: 20px 20px; font-size: 1.3em; line-height: 1.6em; font-family: font-family: 'Open Sans', sans-serif; color: #777; font-weight: 300; }

Any ideas? Thanks for your help!

Michael Welker
Michael Welker
Pro Student 1,117 Points

Thanks Shawn! That did it. Oi vei. It's always the most obvious stuff (comma instead of a semi-colon, etc.). Thank you! (Also, is there no way to reply to a comment? Only post another comment to the original post?)

2 Answers

Shawn Ramsey
Shawn Ramsey
27,143 Points

You have the css rule font-family listed twice. Remove one of the "font-family:" rules and it should work.

Shawn Ramsey
Shawn Ramsey
27,143 Points

It's usually something small that causes the glitches. Comment replies aren't well supported in the forum and usually only one level deep. Adding another answer is usually what I end up doing, like in this case.