Trickspedia Logo Trickspedia Logo
  • Home
  • Contact Us
  • Privacy Policy
  • About Us
Reading: Get Started With Font Awesome
Share
TrickspediaTrickspedia
Aa
  • Home
  • Contact Us
  • Privacy Policy
  • About Us
Search
  • Home
  • Contact Us
  • Privacy Policy
  • About Us
Follow US
Copyright © 2014-2023 Ruby Theme Ltd. All Rights Reserved.
Trickspedia > Blog > Get Started With Font Awesome

Get Started With Font Awesome

TricksPedia By TricksPedia September 8, 2015 5 Min Read
Whatsapp Groups Links
Whatsapp Groups Links
SHARE

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!

Contents
EASIEST: BootstrapCDN by MaxCDNEASY: Default CSSEASY: LESS Ruby GemEASY: SASS Ruby GemPRO: Custom LESS or SASSValidatorsInternet Explorer 8 and @font-faceNeed IE7 Support?Troubleshooting

EASIEST: BootstrapCDN by MaxCDN

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!

  1. Paste the following code into the <head> section of your site’s HTML.
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    

    Immediately after release, it takes a bit of time for BootstrapCDN to catch up and get the newest version live on their CDN.

  2. Pat yourself on the back for your scalable-vector-icons-on-the-website judo solution in a single line of code.
  3. Check out the examples to start using Font Awesome!

EASY: Default CSS

Use this method to get the default Font Awesome CSS.

  1. Copy the entire font-awesome directory into your project.
  2. In the <head> of your html, reference the location to your font-awesome.min.css.
    <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
    
  3. Check out the examples to start using Font Awesome!

EASY: LESS Ruby Gem

Use the Official Font Awesome LESS Ruby Gem to easily get Font Awesome LESS into a Rails project. Generously maintained by @supercodepoet.

  1. Add this line to your application’s Gemfile:
    gem 'font-awesome-less'
    
  2. And then execute:
    $ bundle
    
  3. Or install it yourself as:
    $ gem install font-awesome-less
    

If you use Rails, add this to your e.g. application.less:

  @import "font-awesome-sprockets";
  @import "font-awesome";

EASY: SASS Ruby Gem

Use the Official Font Awesome SASS Ruby Gem to easily get Font Awesome SASS into a Rails or Compass project. Generously maintained by @supercodepoet.

  1. Add this line to your application’s Gemfile:
    gem 'font-awesome-sass'
    
  2. And then execute:
    $ bundle
    
  3. Or install it yourself as:
    $ gem install font-awesome-sass
    

If you use Rails, add this to your e.g. application.scss:

  @import "font-awesome-sprockets";
  @import "font-awesome";

PRO: Custom LESS or SASS

Use this method to customize Font Awesome 4.4.0 using LESS or SASS.

  1. Copy the font-awesome/ directory into your project.
  2. Open your project’s 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.
    @fa-font-path:   "../font";
    

    The font path is relative from your compiled CSS directory.

  3. Re-compile your LESS or SASS if using a static compiler. Otherwise, you should be good to go.
  4. Check out the examples to start using Font Awesome!

Validators

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.

Internet Explorer 8 and @font-face

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.

Need IE7 Support?

If you need IE7 support, you have my condolences. Really. Font Awesome 4.4.0 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.

Troubleshooting

If you’re having trouble with Font Awesome, make sure to check out the troubleshooting wiki page. Generously maintained by @gtagliala.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Copy Link Print
Previous Article Whatsapp Groups Links How To Get Likes on Fb Comments
Next Article Whatsapp Groups Links How To Mirror Android Screen on PC
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Facebook Like
Twitter Follow
Pinterest Pin
Instagram Follow

Subscribe Now

Subscribe to our newsletter to get our newest articles instantly!

Most Popular
letters on the wooden blocks
High DA/PA Backlink Google Sheet 2024
November 24, 2023
selective focus photography of person holding turned on smartphone
(Live Again) Mobikwik Loot – Get Rs.10 Wallet Balance Absolutely Free On Sign Up
November 19, 2023
Download Instagram Photos And Videos
How to download Instagram Photos & Videos
November 18, 2023
Telegram Group Links
Telegram Group Links – Join 18 + Adults Telegram Groups(100+ Added)
November 18, 2023
Whatsapp Groups Links
(*2 METHODS*) HOW TO CHANGE FACEBOOK PROFILE NAME BEFORE 60 DAYS LIMIT
November 14, 2023

You Might Also Like

letters on the wooden blocks
SEO

High DA/PA Backlink Google Sheet 2024

2 Min Read
selective focus photography of person holding turned on smartphone
How ToTrendingTricks

(Live Again) Mobikwik Loot – Get Rs.10 Wallet Balance Absolutely Free On Sign Up

2 Min Read
Download Instagram Photos And Videos
How ToInstagram

How to download Instagram Photos & Videos

3 Min Read
Telegram Group Links
TricksAndroid

Telegram Group Links – Join 18 + Adults Telegram Groups(100+ Added)

7 Min Read
newsletter featured

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Trickspedia Logo Trickspedia Logo

We provide tips, tricks, and advice for improving websites and doing better search.

Categories

  • HOME
  • SEO
  • Trending
  • Tricks
  • Home
  • Contact
  • Blog

Important Links

  • Complaint
  • Advertise

Get the Top 10 in Search!

Looking for a trustworthy service to optimize the company website?
Request a Quote
Trickspedia - All Rights Reserved
Welcome Back!

Sign in to your account

Register Lost your password?