This is one of the method to Change font color "onMouseOver" and "onMouseOut" using(CSS)

<style type="text/css">
<html>
<!-- Created on: 27/09/2012 -->
<head>
  <title></title>
</head>
<body>
 <table onmouseover="document.style.x.color='white'"  border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#008080" width="100%" height="34" bgcolor="#95BED4">
      <tr>
        <td onMouseOver="this.style.backgroundColor='#2172A1';  this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#95BED4'" width="20%">
         <!-- <P> tag onMouseOver Color -->
  <p align="center"><b><font face="Verdana" color="#2172A1" onmouseover="this.style.color='white'" onmouseout="this.style.color='#2172A1'" size="2">Home</font></b></td>
      </tr>
    </table>
</body>
</html></style>

you can do it like this: make two classes in your stylesheet something like menuon and menuoff.

<style type="text/css">
td.menuon { background-color: #000000; color: #FFFFFF; }
td.menuoff { background-color: #FFFFFF; color: #000000; }
</style>

<td class="menuoff" onmouseover="className='menuon';" onmouseout="className='menuoff';">
</td>

<a href="#" style="text-decoration: none;" onmouseover="this.style.textDecoration = 'underline'" onmouseout="this.style.textDecoration = 'none'">asdasdasdads</a>


<p onMouseOut="this.style.color = 'black';" onMouseOver="this.style.color = 'red';" align="justify">
Your text here to change text on mouseover</p>

0 comments

Related Posts Plugin for WordPress, Blogger...