Menu
I have the following code and I was wondering if there is a way in html to view an image in the alt tag instead of plain text? I’m sure I have seen it done somewhere before or was that in JavaScript?
[code=html]<span title=”Popup”>My text</span>
[CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title></title>
<style type="text/css">
a:link {color:#212121;}
a:visited {color:#008080;}
a:hover {color:#F00;}
a:active {color:#000;}
/* above: controls colors of links */
.buttons a {color:#000; background-color:white; display:block;
font:13px arial, sans-serif; font-weight: bold; text-decoration:none;
margin-top:3px}
/* Above: controls how 'buttons' anchors behave */
.buttons a:hover {background-color:#fff; font:13px verdana;
font-weight: bold; text-decoration:none;}
/* Above: controls how 'buttons anchor on-hover' behave */
#menu {position:relative; width:160px; height:auto;
text-align: center; padding:10px 0 10px 0; border:1px double silver;}
/* Above: the actual "menu", a list of links */
#menu a span {display:none;}
/* Above: how the "<span>text la-la-la text</span>" is handled */
#menu a:hover span {
display:block; position:absolute;
top:145px; left:10px;
width: 125px;
z-index: 100;color:black;
background-color:#fff99d; padding:10px; font:1em Verdana, sans-serif;
border:1px solid black;
/* Above: how the <span>text la-la-la text</span> is handled when
hovering over the visible link-text (the 'pop-up') */
}
</style>
<link rel="shortcut icon" href="favicon.ico"><!-- path to your favicon -->
</head>
<body>
<div id="menu" class="buttons">
<div id="menu">
<a href="http://www.w3cschools.com">w3cschools<span>World Wide Web Consortium ("W3C") Schools Web Site</span></a>
<a href="http://www.webdeveloper.com">webdeveloper.com<span>WebDeveloper.com Forums, offering free help with your web pages.</span></a>
<a href="http://www.msn.com">MSN<span>The MSN Start page: A useful "HOME PAGE" as place to start your daily search.</span></a>
<a href="http://joelburdick.awardspace.com">My Site<span>Joel's online site of published web sites.</span></a>
<a href="http://joelburdick.awardspace.com/carved_wood">Ontario Carved Driftwood<span>A Wood-carved Elephant Head that
I made this past summer from driftwood that I found here in Toronto by Lake Ontario.</span></a>
</div>
</div>
</body>
</html>[/CODE]
[code=html]
a.info
{
position:relative; /* this is the key */
z-index:24;
color:#000000; /* colour of display text */
text-decoration:none;
}
a.info:hover
{
z-index:25;
}
a.info span
{
display: none; /* hide the span text using this css */
}
a.info:hover span
{ /* the span will display just on :hover state */
display:block;
position:absolute;
top: 2em; /* offset of the tooltip from the top */
left: 2em; /* offset of the tooltip from the left */
width: 15em;
text-align: center;
text-indent: 0px;
}
[/code]
[code=html]
<a class="info">TEST<span><img src="/logofolder/mylogo.gif"/></span></a>
[/code]
[CODE]<a [COLOR="Red"]href="#"[/COLOR] class="info">TEST<span><img src="/logofolder/mylogo.gif"/></span></a> [/CODE]
[CODE]a.info
{
position:relative;
color:#000000; /* colour of display text */
text-decoration:none;
margin: 100px 0 0 0;
[COLOR="Red"]background-color: #FFFFFF[/COLOR];
}
a.info:hover
{
[COLOR="Red"]background-color: white[/COLOR];
}
[/CODE]
[CODE]a.info
{
position:relative; /* this is the key */
z-index:24;
color:#000000; /* colour of display text */
text-decoration:none;
[COLOR="Red"]background-color: #FFFFFF;[/COLOR]
}
a.info:hover
{
z-index:25;
[COLOR="Red"]background-color: #white;[/COLOR]
}
a.info span
{
display: none; /* hide the span text using this css */
}
a.info:hover span
{ /* the span will display just on :hover state */
display:block;
position:absolute;
top: 2em; /* offset of the tooltip from the top */
left: 2em; /* offset of the tooltip from the left */
width: 15em;
text-align: center;
text-indent: 0px;
}[/CODE]
[CODE]<a href="www.google.com" class="info">TEST<span><img src="/logofolder/mylogo.gif"/></span></a>[/CODE]
a.info:hoverNo "#" required for 'word descriptor' of color being used.
{z-index:25; background-color: [B][SIZE="4"]#[/SIZE] [/B]white;}[/QUOTE]
[CODE]background-color: #white;[/CODE]
should be [CODE]background-color: white;[/CODE]
- the "#" indicates hex code.[CODE]a.info img {
border: 0;
}
[/CODE]
0.1.9 — BETA 5.19