Support » How-To and Troubleshooting » How to center custom logo header image

How to center custom logo header image

  • I’ve been searching for a while now to find others with this problem, but their solutions don’t seem to help me.
    I have the ‘personal trainer’ theme by Steve Deane and I can’t get my header image to center

    The image resolution is 1800×236. Of course I will scale it but first I need to know how to center it.

    So far I used the plugin ‘Dynamic Headers by Nicasio Design’ and the following code in header.php:

    <?php if(function_exists(‘show_media_header’)){ show_media_header(); } ?>

    Can anyone help me with this? Thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Add class=”logo” to <img

    And this inside css

    .logo {
    margin: 0 auto;
    display: block;

    Great, thanks for your quick response.
    Forgive me that I don’t know what I don’t know…

    Do I have to paste ‘class=”logo” to <img’ in header.php


    .logo {
    margin: 0 auto;
    display: block;

    in style.css ??

    Tried that but didn’t work…

    Where you call your header logo.
    <img src=”my-header-logo-url.png” class=”logo”>

    In style.css

    .logo {
    margin: 0 auto;
    display: block;

    I hope you are working with child theme.
    Don’t make changes to parent.
    It’s my duty to warn you.

    Thanks again! Good to hear that you take your duty seriously 🙂

    Well it worked with the original header of the theme but not with the custom header which is above the original.

    Do I have to modify this:

    <?php if(function_exists(‘show_media_header’)){ show_media_header(); } ?>


    I’m not familiar with your code.
    Is that from Dynamic Headers plugin?

    You can ask plugins developer on how to add class or id to headers.

    Yes its the option 1 Dynamic Headers code.
    The alternative option 2 would be:

    <?php if(function_exists(‘dh_get_page_image_url’)){ $dynamic_header_url = dh_get_page_image_url(); } ?>

    There is also a plugin option to set New Alt Tag for a specific image but I dont know how. You got an idea? I contacted the author already.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to center custom logo header image’ is closed to new replies.
Skip to toolbar