What is an alternative to using image maps? I saw a question recently and someone said, “Why are people still using image maps?” and I wanted to know a good CSS or JavaScript solution to see for myself if its better to use than an image map.
Share
CSS is the way to go when working with image maps. You can easily position a link with desired width and height over any area of the image by changing top left width height values.
Check a working example at http://jsfiddle.net/DBvAY/1/
In the example, Hover over the babies face or the red light in the image. To change the position of the anchors all you need to do is modify the top and left properties of #pos1 and #pos2. Same goes for width and height of the bounding box. All done with CSS with no javaScript.