--- layout: base title: Get Started with Font Awesome navbar_active: get-started relative_path: ../ --- {% capture jumbotron_h1 %} Get Started{% endcapture %} {% capture jumbotron_p %}Easy ways to get Font Awesome {{ site.fontawesome.version }} onto your website{% endcapture %} {% include jumbotron.html %} {% include stripe-social.html %}
Setting up Font Awesome can be as simple as adding two lines of code to your website, or you can be a pro and customize the LESS yourself! Font Awesome even plays nicely with Bootstrap 3!
{% endcapture %} {% include stripe-ad.html %}Thanks to the generous folks at MaxCDN, you can use Bootstrap CDN to add Font Awesome into your website with a single line of code. You don't even have to download or install anything!
<head>
section of your site's HTML.
{% highlight html %}
{% endhighlight %}
Immediately after release, it takes a bit of time for BootstrapCDN to catch up and get the newest version live on their CDN.
Use this method to get the default Font Awesome CSS.
font-awesome
directory into your project.<head>
of your html, reference the location to your font-awesome.min.css.
{% highlight html %}
{% endhighlight %}
Use the Official Font Awesome LESS Ruby Gem to easily get Font Awesome LESS into a Rails project. Generously maintained by @supercodepoet.
If you use Rails, add this to your e.g. application.less
:
Use the Official Font Awesome SASS Ruby Gem to easily get Font Awesome SASS into a Rails or Compass project. Generously maintained by @supercodepoet.
If you use Rails, add this to your e.g. application.scss
:
Use this method to customize Font Awesome {{ site.fontawesome.version }} using LESS or SASS.
font-awesome/
directory into your project.font-awesome/less/variables.less
or font-awesome/scss/_variables.scss
and edit the @fa-font-path
or $fa-font-path
variable to point to your font directory.
{% highlight scss %}
@fa-font-path: "../font";
{% endhighlight %}
The font path is relative from your compiled CSS directory.
In order to provide the best possible experience to old and buggy browsers, Font Awesome uses CSS browser hacks in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement.
These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.
Getting started - Validators by Bootstrap Team is licensed under CC BY 3.0
IE8 has some issues with @font-face
when combined with :before
.
Font Awesome uses that combination. If a page is cached, and loaded without the mouse over the window
(i.e. hit the refresh button or load something in an iframe) then the page gets rendered before the font loads.
Hovering over the page (body) will show some of the icons and hovering over the remaining icons will show those as well.
See issue #954 for details.
Getting started - Internet Explorer 8 and @font-face by Bootstrap Team is licensed under CC BY 3.0
If you need IE7 support, you have my condolences. Really. Font Awesome {{ site.fontawesome.version }} doesn't support IE7, but an older version does. You'll need to check out the 3.2.1 instructions for using IE7. Then go complain to whomever decided your project needs IE7 support.
If you're having trouble with Font Awesome, make sure to check out the troubleshooting wiki page. Generously maintained by @gtagliala.