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

/2706 phone icon doesn't display

I can't get the /02706 phone icon to display:

CSS:
.phone::before { content: "/2706"; }

HTML: <p class="phone"> 555-867-5309 </p>

This is what it comes up as on the preview:

/2706 555-867-5309

-I've googled it, and tried multiple different browsers. Any ideas?

1 Answer

Hello,

This code you wrote looks like you're using a font icons, if so, then you need to use the backslash ( \ ) in the "content" property and you would need to specify the font-family. If you're trying to use HTML icons then you most probaly will have to use these: &#. I have never used HTML icons, I usually do this with font icons, so the code would look something like this, depending of course of which font icon collection you're using:

.caption:before{
    font-family:FontAwesome;
    font-weight: normal;
    font-size: 1.2em;
    content:'\f0c1';
    padding: 0 5px;
    color: #8a3028;
}