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 How to Make a Website Customizing Colors and Fonts Pick Fonts and Set Relative Units

Front End Web Dev/How to Make a Web Site/Customizing Colors and Fonts/Second Exercise doesn't seem to take.

I tried copying the exact same steps and selections but it gives me an error.

4 Answers

Mark VonGyer
Mark VonGyer
21,239 Points

Check all your spacing and grammar is correct!

Assignment is to apply the font to the first level headline using font-family and include a sans-serif fallback. Oh, the error message is "Bummer, it looks like you haven't set the font-family level 1 (h1) just yet.

Just to simplify, I only added one type of font just to make sure.

<head> <meta charset="utf-8"> <title>Nick Pettit | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> </head>

/css at the very first line/ @import url(http://fonts.googleapis.com/css?family=Open+Sans);

h1 { color: #fff; font-family: 'Open Sans', sans-serif; } h2 { color: #fff; }

<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> @import url(http://fonts.googleapis.com/css?family=Open+Sans); font-family: 'Open Sans', sans-serif;

That syntax was given from google's own site and I just pasted it as he did.

Thanks for answering so promptly.

Mark VonGyer
Mark VonGyer
21,239 Points

Your code is correct. The import is above main.css, which is great!

Your declaration h1 {font-family: 'Open Sans', sans-serif;} is also correct.

What will be happening is the code is being tested on accuracy, therefore as you have given color too it is not working.

I had a look at the challenge and originally h1 and h2 are together. This is because they share the same color declaration. You are repeating code by breaking them apart.

Simply add a new line for h1 on its own and change the font-family in this section.

Thanks. I tried it but when I came back to the google font part, it combined it. Even when I take it apart it won't take. Could it be a browser issue? I'm using the current version of firefox. I'm going to see if Safari or even Chrome would work.