I was trying to get a menu bar going with the transparency style properties, but it seems to be that all the examples use javascript to assign the style...
If you can define a style for the "a" element and the "a:hover" hover element why does defining a different transparency level in the hover do nothing? background color can change dynamically but transparency doesnt is what im trying to do impossible or have i just not done it properly?
i mean if you need javascript to change the style i might as well do an image swap and have look exactly right...
I know i havent pasted code but if someone can tell me if its possible i will work on it to get it going myself,This works for me (although WinXp SP2 IE complains about active content)<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML401/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled</title>
<style type="text/css">
a.transLink img {
opacity:0.5;
moz-opacity:0.5;
filter:alpha(opacity:50);
}
a.transLink:hover img {
opacity:0.99;
moz-opacity:0.99;
filter:alpha(opacity:99);
}
</style>
</head>
<body>
<a class="transLink" href=http://www.webdeveloper.com/forum/archive/index.php/"#">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/yourimage.jpg">
</a>
</body>
</html>I was sure it would work at a base level... i think it might be that the hover wont change style thats inhereted from an encassing tag or that it just puts it over the top of the new setting...
Thanks for your help HaganeNoKokoroFunny, I just tried it that way (with the styles on a.transLink instead of a.transLink img) and it worked fine in netscape/firefox but not in IE.Hmm... that blows, i like Mozilla better but too bad most of the rest of the users on the net dont give a damn.... oh well at least i have options to get past the problem.
If you can define a style for the "a" element and the "a:hover" hover element why does defining a different transparency level in the hover do nothing? background color can change dynamically but transparency doesnt is what im trying to do impossible or have i just not done it properly?
i mean if you need javascript to change the style i might as well do an image swap and have look exactly right...
I know i havent pasted code but if someone can tell me if its possible i will work on it to get it going myself,This works for me (although WinXp SP2 IE complains about active content)<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML401/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled</title>
<style type="text/css">
a.transLink img {
opacity:0.5;
moz-opacity:0.5;
filter:alpha(opacity:50);
}
a.transLink:hover img {
opacity:0.99;
moz-opacity:0.99;
filter:alpha(opacity:99);
}
</style>
</head>
<body>
<a class="transLink" href=http://www.webdeveloper.com/forum/archive/index.php/"#">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/yourimage.jpg">
</a>
</body>
</html>I was sure it would work at a base level... i think it might be that the hover wont change style thats inhereted from an encassing tag or that it just puts it over the top of the new setting...
Thanks for your help HaganeNoKokoroFunny, I just tried it that way (with the styles on a.transLink instead of a.transLink img) and it worked fine in netscape/firefox but not in IE.Hmm... that blows, i like Mozilla better but too bad most of the rest of the users on the net dont give a damn.... oh well at least i have options to get past the problem.