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 trialDavid Hynes
4,309 PointsFont Not Changing
Hey all.
I have a conundrum regarding my Google font. Here it is in my index:
<head> <meta charset="utf-8"> <title>David Hynes | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> </head>
And CSS main:
h1 {font-family: 'Play', sans-serif; margin: 15px 0; font-size: 1.75em;}
Jacob Miller
12,466 PointsThe Google font is working for me. Are you sure that you are linking to the main.css file correctly?
2 Answers
Gaylen Miller
19,286 PointsHere's what I tried and the H1 was in Play and the H2 was not. Make sure the href="" on the link rel="stylesheet" points to the .css file.
<head>
<meta charset="utf-8">
<title>David Hynes | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css">
</head>
<body>
<h1>This is a test of the H1</h1>
<h2>This is an H2</h2>
</body>
h1 {
font-family: 'Play', sans-serif;
margin: 15px 0;
font-size: 1.75em;
}
David Hynes
4,309 PointsHey it worked tonight for some reason without me changing anything... very odd! Maybe Google was resetting those servers last night or something! Thanks for chiming in, everyone!
Garrett Levine
20,305 PointsGarrett Levine
20,305 Pointsit's possible it could be an issue with the font/google fonts itself. I recommend changing to some basic fonts to see if it a code issue, or an external issue, and then we can move on from there!