• Resolved jesss

    (@jesss)


    I have an image that I want to use as a link. You know, the kind that would normally go:

    <a><img /></a>

    Except this isn’t working. The image doesn’t show, but my alt tag for it does.

    I’ve gone back and done fresh installs of WP, downgraded versions, etc. but no luck. If I turn on Firebug to see what’s going on, Firebug can’t show me a thumbnail of the image if I hover over the URL. If I were to write a lot of CSS making the image the background-image of the link, then it shows up, but isn’t clickable.

    Is this something I am doing wrong? Or is there a problem with my server? I’m completely confused.

    Here’s my code.

    <div id="title">
        		<a rel="home" title="Homepage" href="#"><img src="images/title.png" alt="Title" /></a>
        </div>
Viewing 2 replies - 1 through 2 (of 2 total)
  • the way you clalled the image with a realtive path only works from the css file.
    for the image src in the php files you could use the absolute file path with the wordpress template tag ‘bloginfo’:

    <a rel="home" title="Homepage" href="#"><img src="<?php bloginfo('template_url'); ?>/images/title.png" alt="Title" /></a>

    Thread Starter jesss

    (@jesss)

    Works!!!! I’ve always done it the other way wit no problems, but this works!!! Vielen dank ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image used as link cannot be found’ is closed to new replies.