Changing the colour of Font Awesome icon when adding it as a pseudo element

Can I change the colour of a font awesome icon when adding it as a … Read more Changing the colour of Font Awesome icon when adding it as a pseudo element

Can I change the colour of a font awesome icon when adding it as a pseudo element?

code example:

#id::before {
  content: "f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  padding: 8px;
  vertical-align: middle;
}

adding color: red; does nothing

p.s. I’m including the stylesheet in my html and the icon IS showing up OK. I just want to change the colour.

Thanks in advance

Source: CSS – Stack Overflow



Leave a Reply

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