I am trying to use FontAwesome in my Rails project but without Bootstrap or having to use classes à la <i class="icon-camera-retro"></i>
.
I dropped all the 5 font files into my folder /assets/fonts
and then in my base.css
I do this:
@font-face {
font-family: 'FontAwesome';
src: url('fontawesome-webfont.eot?v=3.0.1');
src: url('fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
url('fontawesome-webfont.woff?v=3.0.1') format('woff'),
url('fontawesome-webfont.ttf?v=3.0.1') format('truetype');
font-weight: normal;
font-style: normal;
}
Then I want to do something like this:
<span class="foo">Text</span>
.foo:before {
font-family: 'FontAwesome';
content: "\2022";
}
The problem is it's not working at all.
Can anybody tell me how it's done?
Thanks for any help.
I think your code is fine, I have it working the same:
span:before {
content: "\f059";
font-family: 'FontAwesome';
font-size: 120%;
}
I have a question icon ( icon-question-sign - 
)
My question to you is what is this?
content: "\2022";
I do no see it in here...might be your answer..:
FontAwesome Sheet
icon-camera-retro should be:
content: "\f083";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With