Site logo

[Support request] Set the Entire header element to be a link

Home Forums Support [Support request] Set the Entire header element to be a link

Home Forums Support Set the Entire header element to be a link

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2581008
    Josh

    I created a header element and set it to a test page.

    The header element has an image as a background and in the content I put this code:

    I’ve added 15% padding to the top and bottom of the element in the options.

    I don’t know how to make this entire header be the link though. Is that possible?

    I tried setting .sitebannerlink to 100% height and to display as a block but still nothing.

    #2581009
    Josh

    adding myself to notifications…

    #2581065
    Leo
    Staff
    Customer Support

    Hi there,

    Did you get this to work? The entire image is clickable to me currently.

    The Container link option in GB pro would be very helpful if you have it:
    https://docs.generateblocks.com/article/container-links/

    #2584450
    Josh

    Not really. The only way I could get it to do the link for the whole image was to remove the background image from the element and add this code:

    <div class="sitebannerlink">
    	<a href="/events/expo-2/"><img src="/wp-content/uploads/2023/03/SNF_working_1154x350.jpg" /></a>
    </div>

    The problem with this method is that the image doesn’t span with width of the page. Is there any way to do this with the image spanning the background?

    #2584855
    Fernando
    Customer Support

    Hi Josh,

    The easier way would be to use a Block Element for your Header and use the Container link option in GB pro.

    Otherwise, try adding this through Appearance > Customize > Additional CSS:

    .sitebannerlink img {
        width: 100%;
    }
    
    .page-hero .inside-page-hero {
        max-width: unset;
    }
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.