[Solved] clickabe imagemap who show div over the imagemap, the position gets wrong if I add more HTML


absolute positioned elements will position themselves relatively to their first parent which has its position set (anything other than the default static)

therefore, all you need to do is set a position to the div that contains the image and the X’s:

<div class="container">
    <img src="http://images.apple.com/v/iphone-6/a/images/overview/design_details_left_large.jpg" usemap="#foo" />
    <div id="divcar1" class="divcar1">x1</div>
    <div id="divcar2" class="divcar2">x2</div>
</div>
.container{
    position:relative;
}

solved clickabe imagemap who show div over the imagemap, the position gets wrong if I add more HTML