Site logo

Archived topic

Individual header image

23 replies · Started by Anonymous on November 25, 2014

Viewing posts 16–24 of 24

You're welcome :)

Thanks for the excellent advice here, which I am now using on a site I'm building, but I cannot get the header image to centre align. Here is link to site. Any advice on how to align in centre?

Thanks,
James

Since you don't have a container around your image, you'll have to add the CSS directly to the image HTML:

<img alt="" src="http://www.psychestott.co.uk/home/wp-content/uploads/2015/02/Front-Header.jpg" style="margin: 0px auto; display: block;">

Hi Tom,

I'm using the custom header php you provided in post #111841and it worked great, but I end up with a narrow white strip between the custom header image and the main nav bar below it. I've sen a few others post about this, but I haven't had luck with fixing it.

Using GP Hooks and this php:

<?php
global $post;
$image = get_post_meta($post->ID, 'custom_header', true);
if ( ! empty( $image ) ) : ?>
" alt="" />
<?php else : ?>

<?php endif; ?>

I tried the fix you mention in post #98734, but didn't have any luck:

.inside-header img {
position: relative;
vertical-align: bottom;
}

Stumped....

Do you have a link to one of your pages showing that gap? I should be able to give you some CSS :)

Hi Tom,
Sorry about the delay. I'm building this on a localhost so not sure how to share the site with you?

Hmm, not possible then..

Make sure this CSS actually targets the right image: .inside-header img

Thanks Tom, but I'm not sure hot to 'target the right image', I'll try and migrate the site to a subdomain on the server so you can see the issue

Cheers,
D

That would be great :)

This archived topic is closed to new replies.