Can i make an image clickable?

Discussion in 'CSS' started by billybrag, Feb 21, 2006.

  1. #1
    Atm i have a logo on my site that is defined in the stylesheet as a bg image,

    is there anyway that i can make this into a clickable link back to the home page (as seems to be the norm?)

    If there is a way this would be a lot easier than changing all of the php pages as there are quite a few :S

    thanks
     
    billybrag, Feb 21, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Background images cannot be links as far as I am aware.

    The best way to do it would be to alter the element (ie the table cell or div) that the image is the background of to be a link rather than the making image itself a link.
     
    mad4, Feb 21, 2006 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    You would be better served by making the logo image foreground. Then, if images are disabled, the alt attribute's text will display in its place.
    
    <div id="topbanner">
      <a href="index.html"><img src="logo.png" alt="ABC Co."></a>
      ...
    </div>
    Code (markup):
    cheers,

    gary
     
    kk5st, Feb 21, 2006 IP
  4. scoobywow

    scoobywow Guest

    Messages:
    210
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Background images are used so that text and other images can be placed on top of them.

    If you could make a background image clickable, with a large image it would make things a tad difficult.

    Regards Roger
     
    scoobywow, Oct 21, 2006 IP
  5. PalSys

    PalSys palsys.io

    Messages:
    2,628
    Likes Received:
    224
    Best Answers:
    0
    Trophy Points:
    230
    #5

    It's been 244 days...hopefully he's already resolved this :D
     
    PalSys, Oct 23, 2006 IP