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 trialTommy Gebru
30,164 Pointstask 2
<code>In your CSS, apply your font to the first level headline using font-family. Include a sans-serif fallback. Bummer! It doesn't look like you've set the font-family for level 1 (h1) headers yet.</code> I dont know whats wrong with my code , originally the h1 and h2 were together but I separated them because the instructions seemed specific. The font-family from Google fonts of my choosing is Megrim.
h1{
color: #fff;
font-family:Megrim sans-serif;
}
h2 {
color: #fff;
}
4 Answers
Jeff Busch
19,287 PointsHere is the code that passes.
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
h1, h2 {
color: #fff;
}
nav a {
color: #fff;
}
nav a:hover {
color: #32673f;
}
h1 {
font-family: Megrim, sans-serif;
font-size: 1.75em;
font-weight: normal;
}
Arthur Verschaeve
20,816 PointsYou have to set a comma between 2 fonts and your own included font have to be between quotes.
font-family: 'Megrim', sans-serif;
Jeff Busch
19,287 PointsYou only need the quotes if the font name is more than one word with a space in between the words.
Arthur Verschaeve
20,816 PointsTip: when working with google fonts you can simply copy the code. https://www.dropbox.com/s/rea7zalpj4zulud/Screenshot%202014-04-19%2019.43.12.png
Justin Rice
698 PointsThis issue appears to be related to the tree house code challenge tool assessing your entries to the code. The pre-populated css content, which already contains a h1 reference of, h1 { color: #fff; } I added a line font-family under the color line and it failed. You must create another h1 and add the font-family line of code to the the newly created h1. I had the correct code under the color line above, but, I finally realized it had to be added to the newly created h1 line- just for this assessment. h1 { font-family:'Changa One', sans-serif; }
I tried different google fonts and different browsers with the same results.
Tommy Gebru
30,164 PointsTommy Gebru
30,164 PointsIs it necessary for megrim to be capitalized?