Add custom social icons to your Squarespace header (Brine 7.0)
If you’re doing a custom design, you may be wanting to go all in with things like colors, fonts, patterns and icons.
So, if you want to include those gorgeous social media icons you – or your graphic designer –created, keep reading my friend because we’ll be looking at how you can add custom social media icons to your Squarespace header!
The bad news is that to add custom icons to your navbar we’ll have to use HTML.
The good news is that it’s fairly easy! So let’s get to it.
First, go to Settings > Advanced > Code Injection to add the new icons bar to the top of every page of your site.
We’ll be creating a simple container that will act as the background of our social media bar. I’ll give it an ID of #socialicons-bar.
Next, we’ll be creating another container inside it. This will be the wrapper holding all of our icons and I’ll give it an ID of #socialicons.
By having this inside the previous container, it will be super easy for us to realign the icons!
Inside that last wrapper we’ll be adding a tags so that anything we place inside them (text or images) is clickable.
I’ll be adding 4 links, but you can use less or more depending on how many social icons you’re planning to add.
Great. Now, we can give each link its corresponding hyperlink.
I’m going to be working with Twitter, Facebook, Pinterest and Flicker (‘cause why not?) in that order.
Then, if you’re working with pure text you can simply type it in between each set of a tags, however since I want to add custom social icons I’ll be adding images.
Therefore, I need an img tag in between each of my link tags.
Each img tag will have a src and alt attribute so I can fill in the information for each social icon.
As you can see, FINALLY things are happening on our site.
We now have those broken link icon thingies along with the alt text we gave each image at the top of our screen.
Time to add the icons!
To do this, we need to either link to our images saved in an image hosting website, or simply upload them to our site through the CSS window and grab the link from there.
Just click on the “Manage Custom Files“ button at the bottom of your Custom CSS window, upload each of your icons and then click on the file to bring up their corresponding URL inside the window.
Once you have all your links, I recommend pasting them on a post it note on your desktop or a word document so its easier to copy/paste instead of having to go back to this window each time.
Don’t forget to DELETE the URL’s from the CSS window!!
Heading back to our HTML inside the Code Injection section, paste each of the image links inside its corresponding src attribute.
Alright! Our images are finally in place!!
Huge, but in place.
It’s time to move onto our Custom CSS window to style the bar a little bit.
I’ll begin by giving our new bar a background color, so I’ll be targeting the main container #socialicons-bar
And now how about we realign the icons to the right?
We can use text-align for that.
We can space them out a bit, so let’s set each a element as inline-block to give them a margin.
And let’s push all the icons further from the right edge by giving the #socialicons container a margin as well.
Last but not least, let’s shrink down the images!
We’ll target the img element inside our #socialicons container. I’ll give them a width of 27px.
Gorgeous!!
And btw, if you want to have the links open in a new tab, you can always go back into your HTML and add target=”_blank” to each of your a tags!
Here’s the final result in all three screen sizes!
So there you go, that’s how you can add custom social icons to your Squarespace site!
Until next time,
B.