Jump to content

Can you code a link inside of a .SVG file to open in a new tab?

Recommended Posts

Posted

Hey all, 

I have a .svg graphic in the footer of my site. It was a STRUGGLE to get it to look the way the designer wanted as individual elements which would have made the links much easier. So instead of multiple overlapping elements, I made it as a .svg  file in Adobe Illustrator to avoid all the elements from shifting and not sitting correctly. 

Now my problem is that I want the streaming service links to open new tabs instead of taking users off of the site. Is there a way to do this? I've been trying to figure it out but I'm stuck!

An image of the footer is attached for reference.

Site: https://rabbit-apple-ltnh.squarespace.com/home

Password: Smile

 

Any help or insight is appreciated!

Screenshot 2023-05-25 at 6.19.42 PM.png

Posted

Found a solution for this. To make the link open in a new window target="_blank" needs to be added into the .svg code next to the link inside the <a> and </a> code sections.

Example:

 <a href="https://spotify.com" target="_blank">  </a>

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.