Jump to content

Fontawesome in nav and social icons not showing up for everyone or on mobile

Recommended Posts

Site URL: https://ferret-gold-86m7.squarespace.com/

I am seeking help as i have been at it for hours

I have been trying to add a search icon to the header of my site using font awesome (open to other solutions if recommended) . 

I have tried 2 methods - adding it to the navigation with a :before pseudo however i had to have an actual navigation title so i just used a period so i didnt have to have the word search and just use the icon - not ideal). 

I used this code in the code injection header

 

This CSS in trhe Custom CSS

// ** Search icon in header. ** //

.header-nav-item:nth-child(9) a::before { 
content: '\f002'!important; 
font-family: FontAwesome !important;
display: inline-block;
padding-right: 0px; }

I thought htis worked until I checked it on mobile and shared it with a few colleagues to review,  As seen in the screen capture i see it fine on desktop Chrome but it renders as a sqaufre on mobile and for other uses.

 

I then found this solution in the forum for adding font awesome to the social icons in header. Same results - redners fine on my desktop but not on mobile or for other users.

using the enclosed CSS

// ** Search icon in header. ** //

.header-nav-item:nth-child(9) a::before { 
content: '\f002'!important; 
font-family: FontAwesome !important;
display: inline-block;
padding-right: 0px; }

 

thanks for any help you can provide.

 

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

12 minutes ago, tazmeah said:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

 

Thanks I really appreciate you responding- unfortunately it is still not showing up on mobile in either location (social links or nav)

Link to comment

If FA 4.7 doesn't work, try FA5.

Or you can use CSS to insert search image, instead of FA icons

Or use jQuery to add search image on header (i did this for a site last week)

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

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.