...

View Full Version : scalable image AND its map



eydg
11-27-2012, 03:12 AM
the following is a simple way to make background image scalable.


<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#background
{
width:100%; height:100%; position: absolute; z-index: -1; top: 0; left:0;
}
</style>
<title>Untitled Document</title>
</head>

<body>
<img id="background" src="png_1.png"/>
</body>
</html>




how to do the same to the map of hotspots created for the image in, say, fireworks? Are there any better suited tools?

The purpose is being able to have an image scalable together with its responsive elements, with some html objects on top, also placed relatively to the scale of the image.

I wonder if that is possible at all or a different environment would be needed. any advise?

eydg
11-27-2012, 10:21 PM
200 views and no reply? maybe it is the wrong subforum?

DrDOS
11-28-2012, 12:02 AM
You're going to have to use either javascript or a server side language write the code for the map. It will need to 'know' the size of the image
and multiply the scale of the map accordingly.

eydg
11-28-2012, 01:22 AM
so it is possible? Great. JS is my option of choice.

Now it seems rather clear.
I guess I understand what you mean. The map coordinates will be variables derived with such a formula:

xnew=resolutionew*xold/resolutionold

Is this correct?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum