Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Michael Welker
PLUS
Michael Welker
Courses Plus 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
Courses Plus 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,237 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,237 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.