Jump to content

How do I make the entire code block into a clickable hyperlink?

Recommended Posts

I have used a code block to display an image and when the mouse hovers over it, a Gif will start playing. 

I want to make the entire code block/image/gif clickable to send me to another site. All the working codes I have found was a clickable text that shows up underneath the code block/image.

Any suggestions?

 

Link to comment
  • Replies 1
  • Views 918
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

this would depend on how you have displayed your gif.  Can you share the code?

a basic example would be to use an a tag for the link and place an img tag inside that with your gif.

so an example of that would be (placed in a code block):

<a href="https://forum.squarespace.com/profile/281193-igniteperth/">
  <img src="https://media.giphy.com/media/2W7E1aS87BHsXEiwWq/giphy.gif">
</a>

the "a href" is where the link goes

the img source is the link to your gif

 

Contact Us for detailed help

Common Squarespace Tips

Sharing Your Site Link

Squarespace web designers in Perth WA.

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.