ngleke Posted October 7, 2022 Share Posted October 7, 2022 Site URL: https://polarartist.no Hello, I have Font Awesome icons displayed throughout my site, but now they seem to have disappeared. I can still see them in the code, but they are not displayed correctly, and I'm not the best coder so I don't know how to fix this. Any help would be appreciated. I'm using the personal plan, so I do not have the header injection code, only on each page, but it has worked fine for months until now. The code is supposed to be on any of the underlying gallery sides on https://www.polarartist.no/artister, for example https://www.polarartist.no/artist/aiming-for-enrike The code I'm using: <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.1/css/all.css" integrity="sha384-vp86vTRFVJgpjF9jiIGPEEqYqlDwgyBgEF109VFjmqGmIY/Y4HV4d3Gp2irVfcrp" crossorigin="anonymous"> <style> /* code block padding top bottom */ .code-block { padding-top: 0; padding-bottom: 0; } /* social icons code */ .t-social { display: block; margin: 0 auto; padding-top: 5px; text-align: center; padding-left: 0; } .t-social li { display: inline-block; margin: 0; line-height: 100%!important; } .t-social .fab,.fas { font-size: 28px; margin: 0 8px; color: black; } .t-social .fa:hover {color: white;} </style> <ul class="t-social"> <li> <a href="https://www.facebook.com/aimingforenrike" target="_blank"> <i class="fab fa-facebook-f"></i> </a> </li> <li> <a href="https://www.instagram.com/aimingforenrike/" target="_blank"> <i class="fab fa-instagram"></i> </a> </li> <li> <a href="https://open.spotify.com/artist/78pR36HrjrFVIml89h1y4v?si=7ptyLM3XQf6p1-Sip4J2Og" target="_blank"> <i class="fab fa-spotify"></i> </a> </li> <li> <a href="https://www.youtube.com/c/AimingForEnrike" target="_blank"> <i class="fab fa-youtube"></i> </a> </li> <li> <a href="https://www.aimingforenrike.com/" target="_blank"> <i class="fas fa-link"></i> </a> </li> </ul> Link to comment
Ziggy Posted October 7, 2022 Share Posted October 7, 2022 If you're on the Personal plan then you shouldn't have access to the header code injection globally or on individual pages (this may be different if you're on an old plan but it looks like you're on a new website, 7.1). Code injection is available when you're on a trial, but would be disabled when you purchase the personal plan. I don't know of a way to use fontawesome without code injection, but there are alternatives if you just want social icons with links. https://icons8.com/icons works just fine. Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Solution paul2009 Posted October 7, 2022 Solution Share Posted October 7, 2022 (edited) On 10/7/2022 at 10:16 AM, ngleke said: I have Font Awesome icons displayed throughout my site, but now they seem to have disappeared. I can still see them in the code, but they are not displayed correctly The icons are there - you just can't see them 🙂 This is because you have added inline CSS that sets the icon colour as white (on a white background) and overrides previous CSS that set the colour to black. Here is the offending CSS: .t-social .fab,.fas { font-size: 35px; margin: 0 8px; color: white; } Note that CSS is applied in the order it appears, so if you use CSS to set black and then further down the page you use CSS to set white, the white will override the black. If this post has helped you, please click a 'Like' or 'Thanks' icon below ⬇️ Edited October 8, 2022 by paul2009 edited for clarity Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
ngleke Posted October 8, 2022 Author Share Posted October 8, 2022 My problem is that I have already set the color to black, as you can see in the code I have written above, but when viewing it live on the page it has turned white (it also is white and off-center in editing mode). When you inspect the code and turn the color black again you can also see that the icons are not centered as they should be and I don't know where the problem lays. 😐 I haven't done any changes to the code in the last months and it has worked perfectly fine until now, so I was also wondering if Squarespace has done any changes that might have affected the code. Link to comment
ngleke Posted October 8, 2022 Author Share Posted October 8, 2022 I was able to fix the social icons on the page by adding !important behind color and text-align. The problem was actually in the footer, where I also used somewhat the same code with white color and right align which overwrote the page code. I would not know how to fix this problem particularly, but luckily I am able to use the Squarespace social links widget in the footer so that they won't affect each other any more hopefully. tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment