Skip to content

Instantly share code, notes, and snippets.

@ammmze
Last active December 21, 2015 23:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ammmze/6380290 to your computer and use it in GitHub Desktop.
Save ammmze/6380290 to your computer and use it in GitHub Desktop.

In my experience with Font Awesome, you don't have to use <i>. You can add the icon class to a <div> and it works just the same.

<div class="icon-github"></div>

You can also still put contents within the div like so:

<div class="icon-github">Fork me</div>

This will display the icon with the text inline to the right.

Note: I haven't really checked to see how IE7 handles this, but my guess is that the contents gets replaced by the icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment