I'm a beginner in html css js and I have created an iteractive map of some greek islands . What I am trying to do is when I move my mouse on an island I want to display a pop up box with some info about the island . I can position hidden pop up boxes manually above each island but it seems like a very slow way . In my code below I use the <map> and <area> tags to spot each island on the map .
My code(12 greek islands located on an image ):
<div id = "map-container">
<img src = "IMAGES/island-map.jpg" id="map" usemap="#islandmap">
<map name="islandmap">
<area shape="rect" coords="65,54,152,97" id="Patmos">
<area shape="rect" coords="167,39,264,98" id="Lipsi">
<area shape="rect" coords="70,166,121,186" id="Kalimnos">
<area shape="rect" coords="216,153,279,198" id="Leros">
<area shape="rect" coords="240,216,316,241" id="Kos">
<area shape="rect" coords="265,278,288,300" id="Nisiros">
<area shape="rect" coords="754,418,853,451" id="Kastelorizo">
<area shape="rect" coords="192,611,238,646" id="Kasos">
<area shape="rect" coords="41,257,130,313" id="Astipalaia">
<area shape="rect" coords="255,491,294,633" id="Karpathos">
<area shape="rect" coords="406,339,508,490" id="Rodos">
<area shape="rect" coords="305,378,389,406" id="Chalki">
<area shape="rect" coords="405,270,454,315" id="Simi">
<area shape="rect" coords="301,317,366,358" id="Tilos">
</map>
</div>
CSS (cursor is pointer when you hover over an island ):
map area:hover {
cursor: pointer;
}
My web page with the image :
So the problem is how to display a pop up box using javascript above each island when I hover over one without positioning hidden pop up boxes manually on my page . I am not allowed to use jquery since this is a university project . I would appreciate your help with this . Thank you in advance .
