PDA

View Full Version : hover in ie6?


skinme!
02-16-2003, 09:03 PM
Hi,

i'm having a problem with some JS on this page: http://skinme.net/site

Specifically, when you put your mouse over the subsublinks (eg Current, and Archive on the left) it doesn't highlight as it should. What should happen is that they get a dark background (as they do) and a light text colour (which they don't) identical to when you mouseover News.

The weird thing is it works perfectly on ie6 on my other computer even though it doesn't work on the exact same version down here. I tried clearing my cache in case it had a fuggered function cached.

Here's the relevant CSS & JS code:

CSS
.subnavRight { background: #B1DDE3; color: #435D63;
font-size: 8pt; font-weight: bold; padding-left: 1ex;
text-transform: uppercase; border-bottom: 2px solid
#A5D1DB; border-left: 2px solid #A5D1DB }

.subnavRight a:hover { color: #A5D1DB; text-decoration: none }

.subnavRight a:link, .subnavRight a:visited,
.subnavRight a:active { text-decoration: none;
color: #435D63 }
JS function
function getId(inputid) {
var output;
if (typeof document.layers != 'undefined') output = document.layers[inputid];
else if (typeof document.all != 'undefined') output = document.all[inputid];
else if (typeof document.getElementById != 'undefined')
output = document.getElementById(inputid);
return output;
}

function subnav_rollon(idstem) {
var indicator = getId(idstem+"_indic");
var textcell = getId(idstem);
textcell.style.color = "#A5D1DB";
textcell.style.backgroundColor = "#435D63";
indicator.style.width = "7px";
}

function subnav_rolloff(idstem,celltype) {
var indicator = getId(idstem+"_indic");
var textcell = getId(idstem);
if (celltype == "head") {
bgcolour = "#628993";
colour = "#A5D1DB";
}
else {
bgcolour = "#B1DDE3";
colour = "#435D63";
}
indicator.style.width = "5px";
textcell.style.backgroundColor = bgcolour;
textcell.style.color = colour;
}
HTML link
<A HREF="/site/index.php?tier=front&show=news_current" onMouseOver="subnav_rollon('subnav_front_2')"
onMouseOut="subnav_rolloff('subnav_front_2','norm')">current</a>
Could you please tell me if anybody else experiences the same problem and if there is anything wrong with my code? Maybe my IE is just fuggered :D

Thanks.