Site logo

[Resolved] Individual header image

Home Forums Support [Resolved] Individual header image

Home Forums Support Individual header image

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #98917
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

    #113887
    James

    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

    #114008
    Tom
    Lead Developer
    Lead Developer

    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;">

    #114229
    Dave

    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….

    #114250
    Tom
    Lead Developer
    Lead Developer

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

    #115683
    Dave

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

    #115707
    Tom
    Lead Developer
    Lead Developer

    Hmm, not possible then..

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

    #115736
    Dave

    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

    #115746
    Tom
    Lead Developer
    Lead Developer

    That would be great 🙂

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.