/    Sign up×
Community /Pin to ProfileBookmark

onmouse rool over image buttons, need text label overlay

I searched the forum, and did not find an example for adding text overlays over buttons with the onmouseover/out attribute. The example that I’ve included, changes the button images from grey to red, and it works great. What I need to know, is how to overlay text over these changing images without having to create many gif images with the text labels over them. This would be very time consuming to get the text just right in each image.
Here are the links to the image buttons:

[URL=http://web2.airmail.net/terrycad/Images/GreyBtn200x20.gif]http://web2.airmail.net/terrycad/Images/GreyBtn200x20.gif[/URL]

[URL=http://web2.airmail.net/terrycad/Images/RedBtn200x20.gif]http://web2.airmail.net/terrycad/Images/RedBtn200x20.gif[/URL]

[code=html]<html>
<head>
<title>OnMouseButtons</title>
</head>
<body bgcolor=”#000000″>

<a href=”ThisUrl.htm”
onMouseOver=”document.n001.src=’RedBtn200x20.gif’;”
onMouseOut=”document.n001.src=’GreyBtn200x20.gif’;”>
<img src=”GreyBtn200x20.gif” name=”n001″ border=”0″ width=”200″ height=”20″></a><br>

<a href=”ThatUrl.htm”
onMouseOver=”document.n002.src=’RedBtn200x20.gif’;”
onMouseOut=”document.n002.src=’GreyBtn200x20.gif’;”>
<img src=”GreyBtn200x20.gif” name=”n002″ border=”0″ width=”200″ height=”20″></a><br>

<a href=”OtherUrl.htm”
onMouseOver=”document.n003.src=’RedBtn200x20.gif’;”
onMouseOut=”document.n003.src=’GreyBtn200x20.gif’;”>
<img src=”GreyBtn200x20.gif” name=”n003″ border=”0″ width=”200″ height=”20″></a><br>

</body>
</html>[/code]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Terry_Cadd 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.24,
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,
)...