Create a gist now

Instantly share code, notes, and snippets.

@ammmze /gist:6380290
Last active Dec 21, 2015

What would you like to do?

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