Quick PHP Question

Discussion in 'HTML & Website Design' started by love_natasha, Aug 14, 2008.

  1. #1
    Dear All,


    I want to put a link behind images that I have on my website, the code for the images is ;

    <img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />

    now plz give me the correct code for giving the image an external link to another website. plus usually when i put a link the pictures positioning change.

    Have a look at the website for reference I want to give link to 4 125X125 images at right top of website. when i usually do the the position is disturned, two come down.

    So help me what that too



    Kind regards,



    Nat
     
    love_natasha, Aug 14, 2008 IP
  2. Joseph S

    Joseph S Well-Known Member

    Messages:
    1,373
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    155
    #2
    Add it like this:

    
    [COLOR="Red"]<a href="http://www.whatever.com">[/COLOR]
    <img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" [COLOR="Red"]border="0"[/COLOR] alt="" />
    [COLOR="Red"]</a>[/COLOR] 
    Code (markup):
    It would be even better to use CSS for the image.
     
    Joseph S, Aug 15, 2008 IP