/    Sign up×
Community /Pin to ProfileBookmark

stacked layer/div with rollover and linking — ??

[SIZE=”2″][COLOR=”Navy”][FONT=”Arial”]Is there a way to create a simultaneous effect of both linking and onmouseover for two different layers that are stacked in the same position? Meaning … I have LAYER 1 which would have the “initial image” and the “hot text” that would trigger a rollover (onmouseover) effect for the “new image” to repopulate the same position but in the same or “new” div … onmouseout, the “new image” would hide and the “initial image and “hot text” div content would reappear …

I’ve attempted something of what I wanted, but am still having issues. Any assistance you can provide would be greatly appreciated — THANKS![/FONT][/COLOR][/SIZE]

[FONT=”Arial”][SIZE=”1″][COLOR=”DarkRed”]<html>
<head>
<title></title>
<style type=”text/css”>
.hidden {position: absolute; visibility: hidden}
#netcalltext
{
z-index: 1;
position: absolute;
top: 2px;
left: 2px;
}

#d1
{
z-index: 2;
position: absolute;
top: 2px;
left: 2px;
}
</style>
<script language=”JavaScript”>
<!–
function showIt(obj) {
if (document.getElementById)
{document.getElementById(“d1”).style.visibility = “visible”;}
else
{if (document.layers)
{
document.layers[obj].visibility = “show”;}
else
{document.all(“d1”).style.visibility = “visible”;}
}
}
function hideIt(obj) {
if (document.getElementById)
{document.getElementById(“d1”).style.visibility = “hidden”;}
else
{if (document.layers)
{
document.layers[obj].visibility = “hide”;}
else
{document.all(“d1”).style.visibility = “hidden”;}
}
}
//–>
</script>
</head>
<body>
<div id=”d1″ class=”hidden”><img src=”images/tools-on.jpg” alt=”” width=”194″ height=”280″ border=”0″></div>
<div id=”netcalltext”><a href=”#” onMouseOver=”showIt(‘d1’)” onMouseOut=”hideIt(‘d1’)”><img src=”images/tools-off.jpg” alt=”” width=”194″ height=”280″ border=”0″></a></div>
</body>
</html>[/COLOR][/SIZE][/FONT]

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@CentauriJun 07.2007 — I'm not sure why you are trying to complicate things here - what do you hope the above will do that directly styling an <a> element and changing background images via css (without any javascript) won't achieve?

If your link is on the "lower" div, then it would not be clickable with another on top anyway.
×

Success!

Help @deltatango5 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 4.29,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...