mattscotne
Programmer
Hi all,
I have a css navigation bar that changes color using css.
When you place the mouse over a navigation link the background color changes. When the mouse is removed from the link the original color is restored. (works fine)
When you place the mouse over a navigation link and scroll down using the scroll button on your mouse the link remains highlighted, yet the mouse is now over another link. How can I fix this problem?
I can not fix the problem using the onscroll event as I am using HTML 4.01 Transitional so the event is redundant.
The error only occurs in internet explorer as the other browsers seem to have forseen this error!
I have quickly written up sample code below to reproduce the problem, simply copy & paste to a new file to see what I mean:
Thanks,
mattscotne
I have a css navigation bar that changes color using css.
When you place the mouse over a navigation link the background color changes. When the mouse is removed from the link the original color is restored. (works fine)
When you place the mouse over a navigation link and scroll down using the scroll button on your mouse the link remains highlighted, yet the mouse is now over another link. How can I fix this problem?
I can not fix the problem using the onscroll event as I am using HTML 4.01 Transitional so the event is redundant.
The error only occurs in internet explorer as the other browsers seem to have forseen this error!
I have quickly written up sample code below to reproduce the problem, simply copy & paste to a new file to see what I mean:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Navbar Error Example</title>
</head>
<body>
<div align="center"></div>
<p> </p>
<p> </p>
<p> </p>
<table width="60%" border="1" align="center" cellpadding="1" cellspacing="1">
<tr>
<td><div align="center"><strong>NAVIGATION MENU<br>
</strong>Place cursor over "http link 1" and scroll down the page using scroll wheel on mouse. </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 1</div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 2 </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 3 </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 4 </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 5 </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 6</div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 7 </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 8 </div></td>
</tr>
<tr>
<td bgColor="#FFCC33" onMouseOver="this.style.backgroundColor='#66CCFF'" onMouseOut="this.style.backgroundColor='#FFCC33'"><div align="center">http link 9 </div></td>
</tr>
<tr>
<td><div align="justify">After scrolling with the mouse wheel notice how the background color of "http link 1" remains blue yet the mouse is over another link.
If you just move the mouse without scrolling the background colors change correctly.</div></td>
</tr>
</table>
<p align="center"> </p><p> </p><p> </p>
<p> </p><p> </p><p> </p><p> </p>
<p> </p><p> </p><p> </p><p> </p>
<p> </p><p> </p><p> </p><p> </p>
<p> </p><p>Text at bottom of page. </p>
</body>
</html>
mattscotne