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

Cannot display icon font icomoon

I have tried to follow the lesson and display an icomoon character I selected but I just get a weird character as if the link path was wrong.

This is all what I did:

  1. I placed the icon folder here "app/assets/icons"
  2. I wrote the css rules on this file "bootstrap.css" @font-face { font-family: 'icomoon'; src: url('../icons/icomoon.eot'); src: url('../icons/icomoon.eot?#iefix') format('embedded-opentype'), url('../icons/icomoon.woff') format('woff'), url('../icons/icomoon.ttf') format('truetype'), url('../icons/icomoon.svg#icomoon') format('svg'); }

  3. I wrote the css that displays the icon on the same "bootstrap.css" file .page-header:after { content: "\e602"; font-family: 'icomoon'; }

Is there something I am doing wrong?

1 Answer

Yes, indeed the link path was wrong. I moved the fonts to "app/assets/stylesheet/" And change de link path to "icons/icomoon.eot" and so on...Now it works!