Jump to content

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

Recommended Posts

Posted

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?

 

  • Replies 1
  • Views 1.2k
  • Created
  • Last Reply
Posted

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

 

If you find our solution helpful please thumbs up or mark it as the solution! Thank you 🙂

Contact Us for detailed help

Common Squarespace Tips

Sharing Your Site Link

Squarespace web designers in Perth WA.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.