Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Links within one pic

Status
Not open for further replies.

thumbelina

Programmer
Jun 4, 2001
58
CA
I have one large image that I want to set up so that clicking on different parts of the image will lead you to the different pages of my website. I have seen it done on other websites but when I viewed the html code it was hard to follow to figure out how it worked. Does anyone have any idea of where I could find an explantion of how to set this up with my own picture?
 
Sorry for the last reply, that is for 1 link.
That you asking for is called Image Mapping.

(taken from 9cy.com)

Image maps are images that link to more then one page (look at the header image on all of our pages). They work by having some simple code that corresponds to the pixels in an image. There are two ways that you can make an image map, the first is to simply figure out the pixels for the image and make the code yourself. The second way is to download a free program such as 'Map It©' or 'Live Map©', these programs do all the image mapping for you and then give you the html code to add to your page. If you wish to make the image map, look at the following code:



<IMG SRC=&quot;YourMap.Type&quot; USEMAP=&quot;#YOURMAP&quot; ALIGN=&quot;CENTER&quot; ALT=&quot;IMAGE MAP&quot; BORDER=0>
<MAP NAME=&quot;YOURMAP&quot;>
<AREA SHAPE=RECT COORDS=&quot;29, 28, 85, 53&quot; HREF=&quot;main.html&quot; TARGET=&quot;_top&quot;>
<AREA SHAPE=RECT COORDS=&quot;88, 30, 166, 54&quot; HREF=&quot;tutorials.html&quot; TARGET=&quot;_top&quot;>
<AREA SHAPE=DEFAULT HREF=&quot;index.html&quot; TARGET=&quot;_top&quot;>
</MAP>


This will create a simple image map with 2 parts and a default click area. What this means is that any user clicking on a &quot;host spot&quot; will go to either main.html or tutorials.html depending on where they click. However, if they should happen to click anywhere else, they will go to index.html. You should remember to change the pixel locations, the urls, targets and map type/image. __________________
Visit my homepage
.: Game universE :.
 
There is one program I used to use a while ago which is called MapThis!. A search with google will probably turn itup. I found it extremely easy to use and it produces the code for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top