Search code examples
htmlimagemap

The image map in my project is not working


The image map doesn't work in my project, so there is no area to click on on the image.

Code:

<td>
  <map name="map" id="map">
    <area alt="" title="" href="stat1.php" shape="rect" coords="51,568,116,618" />
    <area alt="" title="" href="stat2.php" shape="rect" coords="140,567,202,612" />
    <area alt="" title="" href="stat3.php" shape="rect" coords="226,568,290,613" />
    <area alt="" title="" href="stat4.php" shape="rect" coords="51,627,116,676" />
    <area alt="" title="" href="stat5.php" shape="rect" coords="139,626,204,677" />
    <area alt="" title="" href="stat6.php" shape="rect" coords="225,627,292,677" />
  </map>
  <img src="img/commander6.png" usemap="#map" width="95%"/>
</td>

I also tried it the other way around, so the <img/> tag was before the <map> tag.


Solution

  • You need to remove

     width="95%"