/    Sign up×
Community /Pin to ProfileBookmark

Adjusting Position of image with mouseover

Hi there,
I’m not sure if this is the correct area to post my question but here goes…

I have an image with a mouseover condition that when the mouse is moved over set co-ordinates the image changes.
What I can’t figure out is how I can position this image centrally on the horizontal axis, and on the vertical axis I want it on the absolute bottom of the page.

Any suggestions?

[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>

<title></title>
<script language=”JavaScript” type=”text/javascript”>
/*<![CDATA[*/

var ImgAry=[‘cam.jpg’,’cam2.jpg’]
var MapAry=[];
for (var zxc0=0;zxc0<ImgAry.length;zxc0++){
MapAry[zxc0]=new Image();
MapAry[zxc0].src=ImgAry[zxc0];
}

function Swap(id,nu){
document.getElementById(id).src=MapAry[nu].src;
}
/*]]>*/
</script></head>

<body>

<table width=”100%” border=”0″ align=”center”>

<img src=”cam.jpg” align=”center” useMap=”#MyMap” id=”tst” />
<map name=”MyMap” >
<area shape=”rect” coords=”160,510,197,567″ onmouseover=”Swap(‘tst’,1);” onmouseout=”Swap(‘tst’,0);” />

</table>
</map>

</body>
</html>
[/CODE]

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @tbone spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...