Search code examples
htmlfirefoximagemap

html image map not working on fire fox


Hello i have a html image map however it will not work on firefox i just get the alt tag :( below is the code with all the area sections removed to keep things short.

<img id="processMap" name="processMap" src="path to image" usemap="#processMap" alt=""/>
            <map id="_processMap" name="processMap">
                #all the areas
            </map>

This works on all the other browsers i have tried (ie, chrome, safari and opera) but with firefox i just get what ever is in the alt tag :/ does anyone know whats up?

Thanks for the help!.

Updated code (still doesn't work)

<img id="processMap" name="processMap" src="path to image" usemap="#processMap" alt=""/>
            <map id="processMap" name="processMap">
                #all the areas
            </map>

Solution

  • your ID's don't match:

    <img id="processMap" name="processMap" src="path to image" usemap="#processMap" alt=""/>
                <map id="_processMap" name="processMap">
                    #all the areas
                </map>
    

    your usemap should be equal to map id, so change it to:

    <img id="processMap" name="processMap" src="path to image" usemap="#processMap" alt=""/>
                <map id="processMap" name="processMap">
                    #all the areas
                </map>
    

    Update

    Working Fiddle

    I just tested on Firefox 28