IPOWERWEB.com

 Affordable, reliable
web hosting solutions

Call IPOWERWEB Today at 1-888-511-HOST Chat with an IPOWERWEB representative LIVE!
24/7x365 service - Live Technical Support

Domain Name Registration
web hosting services
cheap web hosting
IPOWERWEB help section
contact IPOWERWEB
testimonials for best hosting
affordable web hosting
IPOWERWEB web hosting
IPOWERWEB accolades
best domain prices


Web Hosting Money Back Guarantee
home build profit promote manage


Intermediate HTML Tutorial: Client Side Image Maps

Home > Build > Programming > HTML > Intermediate HTML Tutorial

1.7 Client Side Image Maps

Before you put your image map on the web, you have to define your coordinates. In order to do that, you have to determine where they are. You can use image map programs to do this, which we actually recommend. But it wouldn't hurt to know how to find them yourself. We will use Adobe Photoshop for our examples since it is the most powerful, and is becoming the standard for bitmap image editing.

We will use a simple sample graphic with 3 colors:

First, you must ascertain the shape of the graphic. It can be RECT, POLY, CIRCLE, or DEFAULT. Obviously our sample is a rectangle, which is also the default. To find the coordinates:

1. Open Photoshop
2. Go to Window | Select Show Info
3. Drag your mouse to the boundaries of the map area
4. Write down the X and Y coordinates displayed in the Info Palette

Finding the coordinates in Photoshop can be quite time consuming. If that's not for you, download MapEdit, which has a much easier interface.

Now let's put your code together. Here is how the map above was defined.


<MAP NAME="sample">
<AREA SHAPE="rect" COORDS="100,0,150,50" HREF="Inter/link3.htm" TARGET="link3">
<AREA SHAPE="rect" COORDS="50,0,100,50" HREF="Inter/link2.htm" TARGET="link2">
<AREA SHAPE="rect" COORDS="0,0,50,50" HREF="Inter/link1.htm" TARGET="link1">
</MAP>

First you must give the map a name. Then define the shape and the coordinates. Then point to the URL you plan to link that area to.

Now when you use the <IMG> tag to place the map onto the page, you have to point it towards the map you defined. You do this with the USEMAP attribute.

Now you have a client side image map.

<IMG SRC="Inter/map.gif" USEMAP=#sample>

 
home | products | about us | help center | testimonials | press room | contact us
affiliates | careers | domain names | web hosting | site map

Copyright © 1999-2007 IPOWER, Inc. Read our Terms and Conditions. All rights reserved.