Change Table's Background Color (onmouseover)

Ever wonder how to make the background color in a table row change, just by moving your mouse over it? Here's the code to use.

April 1, 2004 --

This question came in: "Well, this is great, and very informative. I wonder if there is a way to unset the background color. So that the color can be changed onmouseover and then the changes removed onmouseout. Useful when there is an image in the background..."

Here's how to do this:

1. Remove the bgcolor="#FFFFFF" (so that the table row will not have a background color, and thus allow people to see the image in the background). I'm assuming your background image is in the page and not in the table cell.

2. Change onMouseOut="this.style.backgroundColor='#FFFFFF'" to
onMouseOut="this.style.backgroundColor=''" (that's two apostrophes followed by the closing quotation mark). In other words, when the mouse leaves the cell, set the background color to NONE, to allow people to view the background image.
[ First posted on 11/25/2003 by Manuel Viloria ]



Do you LIKE this page? Please let us know, and we will publish more of the content that YOU want. Salamat po!


"Yes, I Want To Grow My Financial Life & Get The 11 TrulyRichClub Blessings!"

To Grab This Offer, Click Option Below:

Truly Rich Club Philippine Residents Click Here

Truly Rich Club International Residents Click Here



Visit SupremeWealthAlliance.net ~ Kumita sa Internet, Kahit Super-BUSY Ka

Get In Touch With Manuel Today
Manuel@Viloria.net



  Previous Entry
  Next Entry




Secondthoughts @ Viloria.com
"Invest in yourself, before
others will invest in you."
-- Manuel Viloria


Viloria.com
About Manuel Viloria
Secondthoughts
Archives
Angelhouser
Contact Us
Privacy Statement
RSS Feed


Google Reader


Copyright © 1996 - 2015 by Viloria.com All Rights Reserved.