Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Change cell color when hover

Reply
Thread Tools

Change cell color when hover

 
 
VB Programmer
Guest
Posts: n/a
 
      06-11-2004
How do you change the background/fg color of a cell when the mouse is
hovered above it?

Examples would be nice.


 
Reply With Quote
 
 
 
 
Lau Lei Cheong
Guest
Posts: n/a
 
      06-11-2004
<td onmouserover="self.bgcolor='#000000';"
onmouseout"self.bgcolor='#FFFFFF';"></td>

if you need more than one "state" of color, you probably want to write a
javascript function to handle it.

"VB Programmer" <RobertNZana*NoSpam-Please*@juno.com> ¦b¶l¥ó
news:% ¤¤¼¶¼g...
> How do you change the background/fg color of a cell when the mouse is
> hovered above it?
>
> Examples would be nice.
>
>



 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      06-11-2004

"Lau Lei Cheong" <> wrote in message
news:%...
> <td onmouserover="self.bgcolor='#000000';"
> onmouseout"self.bgcolor='#FFFFFF';"></td>
>
> if you need more than one "state" of color, you probably want to write a
> javascript function to handle it.


Your code doesn't work with me. But this works:

<td onmouseover="this.style.backgroundColor='red';"
onmouseout="this.style.backgroundColor='#FFFFFF';" >
test
</td>

Jos


 
Reply With Quote
 
VB Programmer
Guest
Posts: n/a
 
      06-11-2004
Thanks. How about the foreground color, font-bold, etc...?

"Jos" <> wrote in message
news:...
>
> "Lau Lei Cheong" <> wrote in message
> news:%...
> > <td onmouserover="self.bgcolor='#000000';"
> > onmouseout"self.bgcolor='#FFFFFF';"></td>
> >
> > if you need more than one "state" of color, you probably want to write a
> > javascript function to handle it.

>
> Your code doesn't work with me. But this works:
>
> <td onmouseover="this.style.backgroundColor='red';"
> onmouseout="this.style.backgroundColor='#FFFFFF';" >
> test
> </td>
>
> Jos
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change href color on hover? Ken Williams HTML 3 05-03-2011 02:42 PM
getting columns to change color on hover Rahul HTML 7 07-24-2009 09:38 PM
Change link color on div hover Krys Javascript 20 06-09-2009 11:19 PM
Creating a table cell and changing the color on hover. Mufasa ASP .Net 2 07-03-2008 07:06 PM
change background color on hover or select Gary Javascript 13 09-26-2005 09:00 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57