Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.