|
To set up a client-side image map you should add the image map information by using the <map> tag. For example: <map name="map1">. The map can go anywhere in the document. You can then use the <area> tag and the shape attribute to define the shape and coordinates of the areas you can click in. For example: <area shape="rect" coords="0, 0, 16, 16" href="sample1.htm"> <area shape="rect" coords="0, 16, 16, 16" href="sample2.htm"> The shape of the area can be a rectangle, a circle or a polygon. The coordinates specify the placement and size of the shape. They are:
Paintshop Pro displays the coordinates on the bottom status bar as you move the mouse over the picture or draw with the selection tool; note down the ones you want. The href is the destination page, just like in a normal <a> tag At the right place in your document, add the picture. You use the usemap attribute to refer to the map that you set up: <img border="0" src="map1.gif" usemap="#map1"> In this example, the image map (map1) defines two equal rectangular areas. The area on the left is linked to sample1.htm. The area on the right is linked to sample2.htm. If two or more shapes overlap, Internet Explorer uses the first shape defined in the <map> tag to determine the destination. Any number of <area> tags can specify the same destination. This is useful if you want to map a complex shape to a single destination. If a portion of the picture is not within a given shape, clicking in that portion has no effect. One more thing. It is a good idea to use the alt attribute (like you do with a normal picture) to help out speech-based or text-only browsers. A few design tips:
|
More information Setting up a client-side image map |