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.

brandonlind2
7,823 PointsCould someone please tell me why my CSS font-family isn't working?
My font-family property isn't working, if I put another value in it besides sans-serif and I can't figure out why.
body {max-width: 100%;
margin: 0 auto;
line-height: 1.5;
font-family: "times new roman";}
Also why doesn't sans-serif need to be in "" since it's a two word font family value. I noticed instead it uses a -. Is there a reason for this, is this just an oddity or is it optional to use '' or - for all two word font-family values?
MOD edit: formatted code.
5 Answers

Kathleen Sapp
12,776 PointsBrandon- Try this:
font-family: "Times New Roman", Georgia, sans-serif;

Kathleen Sapp
12,776 PointsBrandon- Yes, capitalize font families like Times New Roman but not generic fonts like serif and sans serif.

Kathleen Sapp
12,776 PointsBrandon- try this:
body {
font-family: "Times New Roman", Georgia, sans-serif;
max-width: 100%;
margin: 0 auto;
line-height: 1.5;
}
Can you tell me the name of this code challenge so I can try it and see what's up?

brandonlind2
7,823 PointsThanks for the reply, nope it's still not working. Do the first letter of words in times new roman need to always be capitalized?

brandonlind2
7,823 PointsThanks!, is there something else that would cause it not to work? I'm still having difficulty getting any type font to work. I've copy and pasted this {font-family: "Times New Roman", Georgia, sans-serif;} into multiple practice websites and it hasn't work for any of them. The code looks right, so I not sure whats up.