?
Solved

mouseover <td> text color change

Posted on 2003-11-21
2
Medium Priority
?
4,567 Views
Last Modified: 2012-06-21
I would like to know, how to make the text color change when mouseover the <td>, not the text ??

For background color change, I had wrote this and it works:

<td height="20" class="Menu" onMouseOver="this.bgColor='#66cccc';" onMouseOut="this.bgColor='#9999ff'">Menu</td>

is set the font color change also simple like this ??

Thx a lot,
sL

0
Comment
Question by:sLso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
paStiSSet earned 75 total points
ID: 9801503
using this, i have tested and it works correctly:

<td height="20" class="Menu" onMouseOver="this.bgColor='#66cccc'; this.style.color='#FFFFFF'" onMouseOut="this.bgColor='#9999ff'; this.style.color='#0000FF'">Menu</td>
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9801553
Just in case you want to use this in multiple places, you can use a stylesheet...

<html>
<head>
<style>
<!--
.over { background-color:#66cccc; color:#FF0000; }
.out  { background-color:#9999ff; color:#000000; }
-->
</style>
<script language="JavaScript">
<!--
   function chgcell(EL,color)
   {
      var cell=EL;
      cell.className=color;
   }
//-->
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20" class="Menu" onMouseOver="chgcell(this,'over')" onMouseOut="chgcell(this,'out')">Menu</td>
  </tr>
</table>
</body>
</html>
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question