Site logo

Archived topic

Add link to container

10 replies · Started by Viktor on March 22, 2022

Viewing posts 1–11 of 11

Hi,

I have a container with a background image that I would like to add a link to, how do I do this? Can I add a css with specific url and then assign the css class to the box or is there another smart way of adding a link to the container?

Yes!

Really, you can't put a html link in a container? Is there no way to add a H1 and make it transparent or give add a css class with url and then add it to the container?

Hi there.

try this:

1. Select the Container Block and in Advanced > Additional CSS Class(es) add: linked-container
2. Inside the Container select one block eg. Headline and add your link to that.
3. Add this CSS:

.gb-container.linked-container .gb-inside-container {
    position: relative;
}

.gb-container.linked-container a:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
}

This will extend the 'clickable zone' of the link to the size of the container it sits within.

How do I add a headline without anything showing? I only have the image and if I add a headline with a link I need to add sone type of text. Also tried html but didn't work either.

Looking at your design, why not use the image block with a link instead of the background image?

Or you can add a headline block, give it a CSS class, use opacity:0; to hide it.

Thank you Ying, I was looking for a solution like that :)

No problem :)

Can be deleted :) got it to work already

This archived topic is closed to new replies.