Font Awesome icons in place of main menu text name

  • hello8
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
3 years 3 months ago #48360 by hello8
Hi,
I am looking to replace the menu name, in this case 'View Cart' with a cart icon from font awesome.

I am looking to achive this via CSS using, for example:.nav-item.item-285::before {          font-family: "Font Awesome 5 Free" !important;          content: "\f07a" !important;          font-size: 55px !important;} .nav-item.item-285 a.view_cart {          font:0/0 a !important;}
This works inasmuch as it applies an icon to the menu item however then icon is not that associated with unicode f07a. Image attached.

Hope you can assist with what is causing the icon the be displayed incorrectly.

Thanking you in advance. 

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
3 years 3 months ago #48362 by milos
Hello,

Maybe you should add font-weight property (value 400 or 700) to your CSS code. Also, check on Font Awesome website you are using the correct icon code. For further investigation we need the link to the website.

Thanks,
Milos

Please Log in to join the conversation.

  • hello8
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
3 years 3 months ago #48373 by hello8
Hi Milos,

Setting the font-weight to 600 or greater solved the issue and the cart icon displays.

Thank you for your support.

Please Log in to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum