Site logo

Archived topic

Make container block clicable

3 replies · Started by Javier on March 15, 2023

Viewing posts 1–4 of 4

I used to use this code from this post to make a container clickable taking the inside a href url.

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

.gb-container.my-linked-container a {
	text-decoration: none;
}

With the new version of GP + GB it doesn't work, I think it's because it doesn't create the .gb-inside-container div.

How can I make this work again?

Hu there,

try this:

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

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

.gb-container.my-linked-container a {
    text-decoration: none;
}

Thank you David, It doesn't work but i have changed to this and now it's working:

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

.gb-container.my-linked-container .gb-headline {
    position: initial;
}

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

Glad to hear that!

This archived topic is closed to new replies.