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 trialArturo Goicochea
8,077 PointsTypekit font not loading correctly
Hi,
Ive made a simple website using Bootstrap and Ive used a Typekit font, but I dont know why its not appearing. Could anyone help me out? Thanks!
2 Answers
Matthew Mascioni
20,444 PointsNice choice of Crimson as a font! I also like your simple layout. From what I can see, you've loaded Typekit's JS properly and the font is coming through okay. You may not have referenced it properly in your CSS, though.
From a quick look at it, it looks like your Bootstrap CSS is overriding the Crimson font because of the level of specificity you provide in your own stylesheet (Bootstrap styles the h1 through h6 tags with a certain font, you don't override this)
Add this line of code in your my-styles.css file to correct this:
h1, h2, h3, h4, h5, h6 { font-family: "crimson"; }
Doing that seemed to correct the font in the browser.
Arturo Goicochea
8,077 PointsAWESOME! Thanks Matthew, that worked. Didn't think of specificity, but makes total sense.
Matthew Mascioni
20,444 PointsThat's what I like to hear :) Glad it worked!