user1537210
user1537210

Reputation: 15

Image map generated from gimp not working

I generated this image map using gimp and when i added to code to my website it acts like there are no links there at all. Any reason why this might be happening.

<img src="images/footerlinks.jpg" width="175" height="66" border="0" usemap="#map"/>
<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:David -->
<area shape="rect" coords="32,72,239,415" nohref="nohref" /></area>
<area shape="rect" coords="393,320,483,336" href="http://www.dance-mate.com/details.html" /></area>
</map>

Upvotes: 0

Views: 644

Answers (1)

steveax
steveax

Reputation: 17753

The areas you define are outside the bounds of the image (image is 66px tall, first link has a top of 72px, second 320px). Order of the points in the rect shape is left, top, right, bottom). Did you shrink the image, or did the Gimp really generate those areas outside the image bounds?

Also, area is a void element (self closing), nohref isn't valid and make sure to add alt attributes to the links and image (image sized 7x in HTML so you can see the links):

<img src="images/footerlinks.jpg" width="1225" height="462" alt="foo" usemap="#map"/>
<map name="map">
  <area shape="rect" coords="32,72,239,415" href="#bar" alt="bar" />
  <area shape="rect" coords="393,320,483,336" href="#baz" alt="baz" />
</map>

Upvotes: -1

Related Questions