[Support request] How would I make a clickable container with GB?

Home Forums Support How would I make a clickable container with GB?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1355743
    Arp

    Usually I’d display a link as a block and then give it a width & height but I can’t figure out how to do that with GenerateBlocks. Is it just using the button block? Or something advanced with another block?

    Note: the container would need to have an image as a background, so that seems to rule out buttons.

    #1355777
    Leo
    Staff
    Customer Support

    Hi there,

    That will be an option in the pro version.

    Or you can target the link in the container like this:

    .gb-container-123 {
        position: relative;
    }
    .gb-container-123 a:before {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 999;
    }
    #1356865
    Arp

    Sorry, that didn’t work. Could be because I’m using a Headline block, I’m going to have to figure something else out.

    #1356961
    Leo
    Staff
    Customer Support
    #1361900
    Dmitry

    It looks like there is no pro version for GB. And the solution looks not comfortable to use if you have dozens of blocks on the page.

    Any ideas how to make containers work as links?

    #1361912
    David
    Staff
    Customer Support

    Hi there,

    the Pro version is yet to be released.
    This will be one of the features of that version.

    In the meantime you would need to do the following:

    1. Add a Button or <a> element inside the container.
    2. Give the Container Block an Additional CSS class e.g clickable-container
    3. Add this CSS:

    .clickable-container {
        position: relative;
    }
    .clickable-container a:before {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 999;
    }
    #1362178
    Dmitry

    I understand, but there is no way I can add any blocks inside a button block.

    #1362236
    David
    Staff
    Customer Support

    You cannot add a block inside a button.
    The method provided above is the only non-Javascript way of doing this.

    #1362283
    Dmitry

    Anyway thanks! Is there any info about the release date of pro version?

    #1362465
    Tom
    Lead Developer
    Lead Developer

    Not yet – hopefully in the first half of August.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.