[Javascript] Anomolies
Cutter Bl
cutterbl at hotmail.com
Mon Aug 6 20:06:14 CDT 2001
Been playing around with a number of tricks for my site. One thing I don't
understand is the behavior of the A:hover CSS attributes. If mouseover of
the menu items on the left you will see the style changes which are supposed
to occur (red background, grey border, white text).
A:hover.clsMnuItem{
backgound:red;
border-width:thin;
border-style:solid;
color:white;
}
This appears to work on most of the items all of the time, but some of the
items don't change the text color. Would I be better off applying these
style changes through a javascript onmouseover?
function changeStyle(i){
document.(somenameidentifier[i]).style.background = "red";
document.(somenameidentifier[i]).style.border-width = "thin";
document.(somenameidentifier[i]).style.border-style = "solid";
document.(somenameidentifier[i]).style.color = "white";
}
function changeBack(i){
document.(somenameidentifier[i]).style.background = "transparent";
document.(somenameidentifier[i]).style.border = "none";
document.(somenameidentifier[i]).style.color = "black";
}
<a href="mylink.html" onmouseover="changeStyle('1')"
onmouseout="changeBack('1')" name="somenameidentifier1">my link</a>
I haven't tried this, just trying to get some feedback.
Cutter
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
More information about the Javascript
mailing list