Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chenge Table & Text Color on Mouseover 1

Status
Not open for further replies.

astrodestino

IS-IT--Management
Feb 19, 2005
179
AR
Hi!
I got this table:

Code:
<table width="10%" border="0">
  <tr>
    <td><font color="#CCCCCC">TEXT</font></td>
  </tr>
</table>
and I would like to change the table background color and text color on mouse over.
I want to set the table background color to #ffffff and the text to #000000.
I tryed applying CSS and that kind of stuff but I cant get it right.
Is there anyway I can do it?
Tnx!
 
Code:
<table width="10%" border="1" [COLOR=red]onMouseOver="this.style.backgroundColor='ffffff', this.style.color='000000'"[/color] [COLOR=green]onMouseOut="this.style.background='000000', this.style.color='ffffff'"[/color]>
  <tr>
    <td>TEXT</td>
  </tr>
</table>

When you mouseover, the table bgcolor is FFFFFF and the text is 000000. When you mouseout, the table bgcolor is 000000 and text is FFFFFF. You can change the color to whatever color you want.

Hope this helps...


____________________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top