Support » Themes and Templates » Image not showing up

  • Resolved Happyworker

    (@happyworker)


    Hi All, yes but another ‘image not showing up’ post. This one has me confused though and hopefully someone can help.
    http://www.jgsprintmedia.com/blog
    I’m trying to get this image in there
    http://www.jgsprintmedia.com/blog/wp-content/themes/3k2/images/inprint.gif
    This is the funny part…when I put my logo(at the top left) within that space (directly to the right of it), it shows up, however when I put anything else in…it doesn’t show up. Hmm. Here is the css and php as of right now.
    CSS
    .logo img {position:relative; margin: 0px; padding: 0px;}

    HTML/PHP
    <div class=”logo” style=”border:1px solid #000; height: 50px; width: 250px;”><img src=”../images/inprint.gif” border=”0″ alt=”JGS” height=”50px” />
    </div>
    I have had other problems which have been resolved…for instance *.png that needed to be brought into Photoshop and saved for web as PNG-8. I’m not sure if this was an isolated case or if this actually means the template is only reading certain files….thought I’d bring it up though.
    Thanks in advance for the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The problem is that you’re calling the image with a relative path:

    ../images/inprint.gif

    Which means “look in a folder called “images” which is inside the folder one level above the current folder”

    So on your home page, it’s looking here:

    http://jgsprintmedia.com/images/inprint.gif

    Change the path to

    <img src="<?php bloginfo('stylesheet_directory')?>/images/inprint.gif“>

    And you should be fine.

    Thread Starter Happyworker

    (@happyworker)

    Yes that worked, thank you. I guess I should follow this format for calling images. All my other images are showing up though.
    Any event, I learned something new –a little bit of PHP– cool, thanks 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image not showing up’ is closed to new replies.