WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Auto size the Title Logo (11 posts)

  1. Crozon1
    Member
    Posted 3 years ago #

    I'm having a bit of a problem replacing my Title with a Logo.

    In the header file I am replacing:

    <h1><a>/"><?php bloginfo('name'); ?></a></h1>

    With:

    <h1><a>/"><img src="wordpress/wp-content/themes/glossy-stylo/images/new%20crozon%20logo.jpg" width="100%" height="100%">; ?></a></h1>

    Which works great, except my Logo is huge!

    Is there anyway to automatically make the logo a specific size so that it will look exactly the same on different types of resolution?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Try using a logo image that is the right width and height.

  3. Crozon1
    Member
    Posted 3 years ago #

    I thought of that but didn't know if it would mess up the resolution of the logo on different screens. Also I am not really sure what the correct width and height is. In my stylesheet this is the only info that looks close:

    #headerimg {
    height: 200px;
    width: 100%;

    I'll give it a shot though

  4. Crozon1
    Member
    Posted 3 years ago #

    Hey it worked! Well at least on my monitor it look good - thanks!

  5. esmi
    Forum Moderator
    Posted 3 years ago #

    Well, the height you need is 200px, obviously. You might get an idea of the width you need from the width set for the page container.

  6. Crozon1
    Member
    Posted 3 years ago #

    FYI - Using 160px for the height was still too large, so I made it 80px

  7. Crozon1
    Member
    Posted 3 years ago #

    Just noticed the logo isn't showing on my posts now?

    http://www.crozon.ca/blog/welcome-to-the-new-and-improved-crozon-ca

    Any ideas?

  8. esmi
    Forum Moderator
    Posted 3 years ago #

    You must use the full url to your image - not a relative url.

  9. Crozon1
    Member
    Posted 3 years ago #

    I'm not sure I quite understand.

    Do you mean in my header.php I should include the full path to the image? Right now the header image shows on all the pages, just not the post.

    Image:
    http://www.crozon.ca/
    http://www.crozon.ca/blog

    No Image:
    http://www.crozon.ca/blog/welcome-to-the-new-and-improved-crozon-ca

  10. Crozon1
    Member
    Posted 3 years ago #

    Never mind esmi - I know what you mean now.

    The <img src=" path should be the full path not just a portion of it.

    Strange that it worked fine on the pages but not on the post. I have updated it to the full path and everything works fine now.

    Thanks again - I definitely owe you a drink for all your help ;-)

  11. esmi
    Forum Moderator
    Posted 3 years ago #

    The <img src=" path should be the full path not just a portion of it.

    That's it!

    Glad I could help.

Topic Closed

This topic has been closed to new replies.

About this Topic