Jump to content

[Share] How to replace Navigation text with FontAwesome Icon

Recommended Posts

You can use these steps to replace Navigation text with FontAwesome Icon.

If it doesn't work, you can share site url + code you added, I can check problem easier.

#0. Suppose we have 2 text: Book Now, Phone.

You can follow these to replace both with custom icon (we will use FontAwesome Icons)

#1. Use this code to Code Injection > Footer (If your site is Plan and doesn’t support Code Injection, you can edit Site Footer > Add a Code Block > Paste same code)

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />

image.png.11ccd39e2364e6b42c22caba7219695b.png

#2. Use this code to Custom CSS box

div.header-nav-item:nth-child(2)>a, div.header-nav-item:nth-child(3)>a {
    font-size: 0;
}
div.header-nav-item:nth-child(3)>a:before {
    content: "\f095";
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
    font-size: 16px;
}
div.header-nav-item:nth-child(2)>a:before {
    content: "\f075";
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
    font-size: 16px;
}

image.thumb.png.4f6b7dbc67b75c4d3da1ff735d730c84.png

#3. Result

image.png.b3e67e26fb9ae929b0d74c0769697472.png

#4. Note

image.png.10d315aa1754d88379f1d4cf6857a2b9.png

#5. With mobile, use this code

/* Mobile icon */
.header-menu-nav-wrapper>div:nth-child(2)>a, .header-menu-nav-wrapper>div:nth-child(3)>a {
    font-size: 0;
}
.header-menu-nav-wrapper>div:nth-child(2)>a:before {
     content: "\f095";
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
    font-size: 16px;
}
.header-menu-nav-wrapper>div:nth-child(3)>a:before {
     content: "\f075";
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
    font-size: 16px;
}

image.thumb.png.21a8f55ada41eaf2cde77c156b52b655.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Replies 0
  • Views 139
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.