Forums

Can't see the image (5 posts)

  1. jaschulz
    Member
    Posted 6 years ago #

    I have added the following:

    <img alt="myblogLogo" src="myblogLogo.gif" />

    to header.php (in the plaintxtBlog theme)

    the alt text shows where it should (so the html is OK), but the image does not show even though the file myblogLogo.gif is in the same folder with header.php.

    What amd I doing wrong here?

    JAS

  2. bonnerl17
    Member
    Posted 6 years ago #

    I would almost be surprised if this is it but we can give it a shot anyway, try switching the alt and the src around so that the src come before the alt.

  3. jaschulz
    Member
    Posted 6 years ago #

    Nope. Didn't work. I even tried adding height= width= but that didn't help either.

    Any other ideas?

    JAS

  4. jaschulz
    Member
    Posted 6 years ago #

    Just to be perfectly clear, this is the current code (that does show the alt text, but does not show the image):

    (from header.php)

    <div id="header">

    <img src="mybloglogo.gif" alt="MyBlog Logo" title="MyBlog Logo" width="112px" height="35px" />

    <h1 id="blog-title">

    <a>title="<?php bloginfo('name') ?>"><?php bloginfo('name') ?>

    </a>
    </h1>

    <div id="blog-description"><?php bloginfo('description') ?>

    </div>
    </div>

    I can see that my img tag is not enclosed in php. Is this necessary? If so, what would the php tag look like?

    Thanks,

    JAS

  5. jaschulz
    Member
    Posted 6 years ago #

    In case anybody's paying attention, what works is:

    <img src="<?php bloginfo('template_directory'); ?>/myblogLogo.gif" alt="MyBlog Logo" title="MyBlog Logo" width="112px" height="35px" />

    Thanks,

    JAS

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.