1

I have some font awesome icons that I want to change to a different color but for some reason it will not work. Here's my html and css:

HTML

<span><i class="fas fa-globe fa-5x change-color"></i></span>

CSS

.change-color {
       color: #3993e5 !important;
               }
Mertz
  • 65
  • 1
  • 7

4 Answers4

0

I fixed it. I just had to wrap the icon with a div

<span><div><i class="fas fa-globe fa-5x change-color"></i></div></span>
Mertz
  • 65
  • 1
  • 7
0

Will if you using the js file from FontAwosem you should know that this I HTML tag will be removed and replaced with SVG tag so all you need to do is say something like that in your CSS file

svg {
    color: white;
}
ABDO-AR
  • 160
  • 3
  • 9
-1

Be sure that your icon font-family is Font-awesome.

SoliMoli
  • 781
  • 2
  • 6
  • 25
-1

.change-color {
font-family:FontAwesome;
 color:red;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<a class="btn-cta-freequote" href="#">Get a FREE Quote <i class="fas fa-globe fa-5x change-color"></i></a>
SoliMoli
  • 781
  • 2
  • 6
  • 25