Reputation: 39
Ok, So I have made an interactive map, when users go with their mouse over one or red dots they get a little information screen.
But it slides a little when people with smaller screens view the web page: example:
This screenshot shows how it should look:
Screen minimized
As you can see, the green and red dots get out of place, and I want to prevent this from happening.
Code:
<div style="position: relative; left: 0; top: 0;">
<img src="images/overhead.png" width="1000" height="1000" style="position: relative; top: 0; left: 0;"/>
<img src="images/taken.png" class="masterTooltip" height="18" width="18" title="This house is owned by: <?php echo $owner ?>" style="position: absolute; top: 400px; left: 960px;"/>
</div>
Remeber, this:
<img src="images/taken.png" class="masterTooltip" height="18" width="18" title="This house is owned by: <?php echo $owner ?>" style="position: absolute; top: 400px; left: 960px;"/>
Does one dot in the map. Thanks for the help.
Upvotes: 1
Views: 158
Reputation: 216
you can add the size of image in css with percent.
for example if you add
height:100%;
width:100%;
when the screen get smaller or bigger, your images has 100% width and height in screen.
Upvotes: 0