Using FontAwesome icons in Essential theme?

Using FontAwesome icons in Essential theme?

by Lucien Stals -
Number of replies: 5

Hi,

I'm using Moodle 2.6.11 with Essential theme (2014090306).

When I try inserting a FontAwesome icon using code like <span>&#xf1c1;</span> the editor changes it into a little empty square (unknown character) symbol sad

What am I doing wrong?

Cheers,

Lucien.

Average of ratings: -
In reply to Lucien Stals

Re: Using FontAwesome icons in Essential theme?

by Usman Asar -
Picture of Plugin developers Picture of Testers

it depends where are you inserting the icon, as Icons wont work everywhere, besides are you using the correct code?

<i class="fa fa-myicon"></i>

(Edited by Mary Evans - just corrected your HTML markup - original submission Thursday, 6 August 2015, 3:45 AM)

In reply to Usman Asar

Re: Using FontAwesome icons in Essential theme?

by Lucien Stals -

Doh.

I was trying to use the unicode value.

Switching to something like <span class="fa fa-car" style="font-size: 3em;"></span> worked perfectly.

Thanks,

Lucien.

In reply to Lucien Stals

Re: Using FontAwesome icons in Essential theme?

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

For fontawesome icons, rather than using style to add a font-size, bear in mind that fontawesome itself has size classes that can be added eg.

<span class="fa fa-car fa-3x"></span>

In reply to Richard Oelmann

Re: Using FontAwesome icons in Essential theme?

by Lucien Stals -

Thanks for that Richard.

I did not know about that. Learning stuff every day ;)