Jump to content

Replacing default Social Link icons in header (CSS)

Recommended Posts

Hey! 

I have social links turned on to appear in the header of a site I'm building. Is it possible to replace the svg images for each icon within the CSS? I just want to swap out the default squarespace images for my own design svgs. Nothing else!

I have gone through tutorials to create HTML social icons in the header code and then used CSS to position them - this doesn't work for my site as I have a border around the header and the icons are sitting in the wrong place outside of this border.

Any ideas?

Screenshot 2021-10-19 at 10.28.18.png

Link to comment
  • Replies 4
  • Views 433
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

4 hours ago, imlucyelliott said:

Hey! 

I have social links turned on to appear in the header of a site I'm building. Is it possible to replace the svg images for each icon within the CSS? I just want to swap out the default squarespace images for my own design svgs. Nothing else!

I have gone through tutorials to create HTML social icons in the header code and then used CSS to position them - this doesn't work for my site as I have a border around the header and the icons are sitting in the wrong place outside of this border.

Any ideas?

Screenshot 2021-10-19 at 10.28.18.png

Can you share your site with the protected password to check it?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 10/20/2021 at 5:37 PM, imlucyelliott said:

montibymonti.com 

Password: TUESDAYBANANA 

Add to Design > Custom CSS

/* header 3 icons */
header.Header .SocialLinks-inner a svg {
    display: none;
}
header.Header .SocialLinks-inner a {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    transform: unset !important;
}
/* email */
header.Header .SocialLinks-inner a[href*="mailto"] {
    background-image: url(https://cdn.pixabay.com/photo/2019/06/08/21/32/castle-4261029__340.jpg);
}
/* instagram */
header.Header .SocialLinks-inner a[href*="instagram"] {
    background-image: url(https://cdn.pixabay.com/photo/2021/09/23/09/01/swan-6649194__340.jpg);
}
/* facebook */
header.Header .SocialLinks-inner a[href*="facebook"] {
    background-image: url(https://cdn.pixabay.com/photo/2021/09/27/13/06/stones-6660734__340.jpg);
}

 

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

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.