Site logo

Archived topic

Site-header image as a link

2 replies · Started by david on August 11, 2015

Viewing posts 1–3 of 3

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.

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 :)

Tom got this before me, comment removed xD

This archived topic is closed to new replies.