Just make it clickable and centered

Discussion in 'HTML & Website Design' started by ASTRAPI, May 5, 2010.

  1. #1
    Hello

    I have this code that loads a image:

    <img src="blah.png" />

    How can i make it clickable (href) to a site for ex: www.site.com and set the width and height of it?

    I want also to be centered :)

    Thank you
     
    ASTRAPI, May 5, 2010 IP
  2. webria

    webria Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To do so, here is the HTML code.
    change the # with your Site URL. and http://i.dpstatic.com/icon/icon5.png with your image path. as per the image height and width change the height width of tag a and img.
    HTML: <a href="#" style="display:block; margin:0 auto; width:16px;"><img alt="Question" src="http://i.dpstatic.com/icon/icon5.png" title="Question" height="16" width="16" /></a>
     
    webria, May 10, 2010 IP
  3. extremephp

    extremephp Peon

    Messages:
    1,290
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #3
    @webria

    Did you forget to make it centred??

    Add align=center or simply add <center> at the beginning and end it last :)
     
    extremephp, May 10, 2010 IP