Can you hyperlink a container?

Hello, apologies if this sounds dumb… is this a way to hyperlink a container?

I have a grid set up with an image in each section along with a container (attached image as reference). I would like to click these containers to go to another page however it’s only the image in the background that I can hyperlink. This causes issues as the hyperlink does not come through the container box. Is there a way to fix this without adding additional buttons inside the containers?

Would really appreciate some input. Thanks,
Leah

1 Like

Hi Leah,

You can create a transparent button in the same shape and size of the container box and place it over the box as if they’re one.

P.S. if you want to do that, create the buttons as mentioned above, but not transparent, so you can find them on the mobile version and make sure they’re on the correct spot. After you’ve done the mobile optimization, you can go back to the desktop version and make the buttons transparent.

Hi Abdulaziz,

Thank you for your reply. I had a try with that this morning but couldn’t get it to work as the container boxes are responsive to the text/grid inside them so the button just wouldn’t align when scaling and there is no option to stretch it to size. Am I missing something? Might just have to add additional buttons and hope this becomes a feature :frowning:

Appreciate your time,
Leah

Hi all,

If you’re trying to do the same, i’ve found a work around for my issue and that is to put another image in each grid section (set to stretch) and link that to your desired page but make sure it’s ontop of both your background image and container - then make the images transparent and it seems to work a treat.

Take care,
Leah

The only other thing i could suggest is, if you know javascript (or whatever Wix uses) and write an onclick function for the parts of the container. So, say the ‘buttons’ are labeled #button1, #button2 and so on. Usually you can right-click the element and choose properties and the box pops up on the right, choose the onclick event so that it auto writes part of it for you. If you want me to show you the snippet from what I did on my site I will share.

Hello, thank you for responding - this does seem like it would be cleaner way to do it, unfortunately I am a total layman when it comes to code so will stick with the images for now… although one day I hope to be as capable as yourself :slight_smile: I am sure this is very helpful to others though so again thank you for responding. Have a great day