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 CSS Basics (2014) Understanding Values and Units Font Properties

Geethanchan Sivayoganathan
Geethanchan Sivayoganathan
1,036 Points

When I type in " font-family: sans-serif; " it's not changing.But my instructor did the same way and changed it!But how?

When I type in " font-family: sans-serif; " it's not changing.But my instructor did the same way and changed it!Then why isn't it working for me?Am i doing something wrong here?Should I import the font style before using it?

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey there Geethanchan,

First off, did you save your Workspace and refresh the browser window? If you did, it could be that you need to clear your cache.

Second, you can't import "sans-serif" as this is a generic font and available by default always (like "serif" and "monospaced").

If you are still experiencing this, you will need to post a snapshot of your Workspace, so we can see your code. It is also possible that the default font in your browser is already a "sans-serif", in which case you wouldn't notice a change when you added this font-family rule.

Keep coding! :)

:dizzy:

Geethanchan Sivayoganathan
Geethanchan Sivayoganathan
1,036 Points

Thank you for the for the answer Jason.I tried different methods but its no use.BTW because the online workspace keeps crashing I switched to Notepad++.

This is the CSS;

body{ color: #878787; margin: 0; font-size: 1em font-family: Helvetica, Arial, sans-serif; }

Looks like you're missing a semicolon after 1em.

Geethanchan Sivayoganathan
Geethanchan Sivayoganathan
1,036 Points

yeah I figured it out later.BTW Thank you Christopher :)