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 trialHannah Ray
1,109 PointsCSS Code Challenge
Hi Guys,
I have a challenge that I seem to be having a problem with.
It is as follows:
"In your CSS, apply your font to the first level headline using font-family. Include a sans-serif fallback."
So in the CSS file I am entering:
"h1 { font-family: 'Ubuntu Condensed', 'sans-serif'; }"
The link is in index.html - that was the first part of the challenge. It's giving me an error message saying that I need to include Sans Serif as a fallback - which I have?
Confused! What am I missing?
Thanks! H
4 Answers
Lachlan Dawson
10,007 PointsSans Serif is wrapped in apostrophes when it doesn't need them. Your code should look like this
h1 {
font-family: 'Ubuntu Condensed', sans-serif;
}
Hope this helped!
Ardis Barnes
2,988 PointsDid you try it without the single quotation marks? h1 { font-family: Ubuntu Condensed, sans-serif; }
Hannah Ray
1,109 PointsThanks guys! I knew it would be something simple :)
I took the apostrophes off of sans-serif and it worked.
Thanks for your help!
Sean T. Unwin
28,690 Points- serif, sans-serif, cursive, monospace, and fantasy are font keywords -- they can NOT have quotes.
- Fonts that are single words or have no spaces, no special characters, no numbers -- They do NOT have quotes.
- Fonts that DO have multiple words, spaces, special characters, numbers -- They DO need quotes.