Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Arturo Goicochea
Arturo Goicochea
8,077 Points

Typekit 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!

http://arturogh.com

2 Answers

Matthew Mascioni
Matthew Mascioni
20,444 Points

Nice 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
Arturo Goicochea
8,077 Points

AWESOME! Thanks Matthew, that worked. Didn't think of specificity, but makes total sense.

Matthew Mascioni
Matthew Mascioni
20,444 Points

That's what I like to hear :) Glad it worked!