0

I have some trouble with Divi plugin. I need to change icon using content in css. I add font awesome by cdn(it works on website e.g. <i class="fa fa-eercast" aria-hidden="true"></i> displays properly) but now I want to change existing icon from rss to instagram by changing a:before content to instagram code: et-social-rss .icon:before{content:'\f16d'} and it doesn't display icon. Any advice?

1

In addition to content, you also need to specify font family. Otherwise the browser will use whatever font Divi has assigned to that icon, which is probably not Font Awesome.

.get-social-rss .icon:before {
    content: '\f16d';
    font-family: FontAwesome;
}
-1

you don't need to change css code, you can simply change the class to "fa fa-instagram" e.g:<i class="fa fa-instagram" aria-hidden="true"></i>

  • Since the original content is set as CSS :before content, the OP is asking for a CSS way to change - without touching the HTML. – WebElaine Nov 15 '17 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.