Linking a background image

Is it possible to link a background image?

Product:
wix studio editor
What are you trying to achieve:
I am trying to add a link to my background image but it will not let me do it. It doesn’t come up with the option to add a link and when I have tried to replicate the Full bleed effect with the normal image tile it does not work in terms of the bleed like it does when it is.a background image

Hi, @user5612 !!

If it’s not possible to add a link directly to a background image, one possible approach could be to detect clicks on the underlying element—such as the page or section that holds the background—and then use a simple piece of code like the one below to navigate to the desired link. :smiling_face_with_sunglasses:

import { to } from "wix-location-frontend";

$w.onReady(function () {

    $w("#yourSectionID").onClick(() => {
        to("https://www.google.com")
    });

});
1 Like

Exactly as @onemoretime suggested :slight_smile:

If it’s not possible via the editor UI, but has an onClick event in code, then can be done via code :slight_smile:

another out of the box solution without code (that can work depending on design) would be to add an invisible button the size of the section.
Without seeing the exact design you are wanting its difficult to see if this would work correctly.

1 Like

I love all of the creative solutions the community has @Dan_Suhr! :raising_hands:

1 Like