[Resolved] Site-header image as a link

Home Forums Support [Resolved] Site-header image as a link

Home Forums Support Site-header image as a link

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #128527
    david

    Hi, I’m new to WordPress, though have a decent HTML and programming background.
    I am using GeneratePress and all add-ons. Very powerful stuff.

    I have used GP Hooks (in the Before Header section) to:
    a) add an image for a site header
    b) made the image a link back to the home page.
    similar to the post:
    https://generatepress.com/forums/topic/change-site-header-and-title-based-on-page/

    However, there is a gap of about 6 pixels between the bottom of the image and the top of the menu. How can I eliminate this gap?
    My Element Spacing for the Header is 0/0/0/0

    FYI – I have also tried:
    .site-header {
    position: relative;
    background-image: url(‘/wp-content/uploads/2015/08/2016-1.jpg’);
    }
    The image displays correctly in the header and there is no gap. However, I don’t know how to make this image a link.

    Thanks for your assistance.

    #128538
    Tom
    Lead Developer
    Lead Developer

    In the HTML for the image, add this: style="position:relative;vertical-align:bottom"

    So it would be: <img src="URL TO YOUR IMAGE" alt="" style="position:relative;vertical-align:bottom;" />

    That should do it 🙂

    #128540
    Adrian Cojocariu

    Tom got this before me, comment removed xD

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