Archived topic
Container link
3 replies · Started by jens on April 4, 2023
i created button and selected a background image in the containers.
now I want to link the background image as well.
for this i entered the css class in the container: clickable-container
and in the additional CSS I put the following code:
.gb-container.clickable-container .gb-inside-container {
position: relative;
}
.gb-container.clickable-container a:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 999;
}
The link works but is not stored on the "container", but rather in the header area....
What am I doing wrong?
Hi there,
the new Container Block has no hidden gb-inside-container
So this don't work:
.gb-container.clickable-container .gb-inside-container {
position: relative;
}
Remove that, select the Block with the background image, and in Layout set its Position to Relative
so it works now!
I have now used the following code:
.gb-container.clickable-container a:before {
contents: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
}
with z-index: 999
it didn't work
Odd that it did not work with the higher z-index. All good now i see ;)