link in image

Discussion in 'Graphics & Multimedia' started by stickycarrots, May 9, 2008.

  1. #1
    can i make a link in a gif or some kind of image
     
    stickycarrots, May 9, 2008 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    you can use the gif as a link. or you can go old school and use the depreciated image map. or you could slice the image and put it back together with html/css or even use tables if you are inclined to do so (i wouldn't advise it but it is an option) and then make the part of the image you want to be a link, a link. or you could also float a blank link over top of the image to create a link in it. working example below:

    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head>
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    		<title>Link in an image</title>
    		<style>
    			div.my_img_container
    			{
    				position:relative;
    				height:80px;
    				width:80px;
    				background: transparent url(http://forums.digitalpoint.com/image.php?u=76650&dateline=1182322620) top left no-repeat;
    				overflow:hidden;
    			}
    			div.my_img_container a.my_link
    			{
    				position:absolute;
    				bottom:2px;
    				left:5px;
    				width:70px;
    				height:15px;
    				display:block;
    			}
    		</style>
    	</head>
    	<body>
    		<div class="my_img_container">
    			<a href="http://www.travisballard.com" onclick="alert('you found me'); return false;" class="my_link"></a>
    		</div>
    	</body>
    </html>
    
    HTML:
     
    ansi, May 9, 2008 IP
  3. stickycarrots

    stickycarrots Peon

    Messages:
    4,513
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no i want the link in the image. no code out side of the image. its for twitter the back ground image i want it to be a link

     
    stickycarrots, May 9, 2008 IP
  4. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #4
    then the answer to your question is simply no.
     
    ansi, May 9, 2008 IP
  5. punkrazio

    punkrazio Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you can do something similiar to link in an image with flash

    bye
     
    punkrazio, May 9, 2008 IP
  6. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #6
    but you cant use flash as a background image. so that is out.
     
    ansi, May 9, 2008 IP