www.webdeveloper.com
Results 1 to 2 of 2

Thread: My image map hyperlinks don't work, why?

  1. #1
    Join Date
    Nov 2011
    Posts
    9

    My image map hyperlinks don't work, why?

    Hi

    I've generated this code with MapSpinner for mac:


    <html>
    <head>
    <title>MapSpinner Page</title>
    <meta content="MapSpinner" name="GENERATOR">
    </head>
    <body>
    <p></p>

    <!-- Created by MapSpinner -->

    <!-- Beginning -->
    <img src="My-model-2.jpg" width="1000" height="458" usemap="#test" border="0">
    <map name="test">
    <area shape="rect" coords="913,324,973,351" nohref>
    <area shape="rect" coords="914,285,974,311" nohref>
    <area shape="rect" coords="913,244,975,271" nohref>
    <area shape="rect" coords="912,204,977,230" nohref>
    <area shape="rect" coords="912,165,975,192" nohref>
    </map>
    <!-- End -->
    </body>
    </html>



    First i don't know where to paste it in my html code and second when i do paste it in code, hyperlinks don't work.

    Why?

    Thanks

  2. #2
    Join Date
    Mar 2011
    Posts
    1,108
    For an imagemap to work, you need to include href attributes in your <area> tags, as in:
    Code:
    <area shape="rect" coords="913,324,973,351" href="page1.html">
    <area shape="rect" coords="914,285,974,311" href="page2.html">
    <area shape="rect" coords="913,244,975,271" href="page3.html">
    <area shape="rect" coords="912,204,977,230" href="page4.html">
    <area shape="rect" coords="912,165,975,192" href="page5.html">
    Rick Trethewey
    Rainbo Design

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles