This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Mouse hover on TD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Mouse hover on TD " Watch "Mouse hover on TD " New topic
Author

Mouse hover on TD

Mahendran Aiyappan
Ranch Hand

Joined: Sep 05, 2005
Posts: 102
Hi guys,

How to use the class:hover CSS into TD tag so that when the mouse is over the column i want to display a border on it.

I know that a:hover can be used for href tag.

I want the same thing to TD tag.

Please give me a solution.

Thanks

Mahendran A
Subhadip Chatterjee
Ranch Hand

Joined: Dec 12, 2006
Posts: 93
Hi,
Can you not write a script function, onmouseover of the TD, to show the border color? If possible, you can put that into your stylesheet, so, that it will affect all the TDs, throughout your app <if that's what you want, to be consistent>.


Refreshing life every moment...
Mahendran Aiyappan
Ranch Hand

Joined: Sep 05, 2005
Posts: 102
Hi Subhadip,
Thanks for your reply

I know i can write a Javscript function which will be called by onMouseOver() and onMouseOut() functions to change the border color of TD.

But i want to do the thing in CSS way.

Just like a:hover{ }

can you suggest me any good links or code snippets

Mahendran A
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Talked about it on my blog here:
http://radio.javaranch.com/pascarello/2004/12/30/1104419159000.html

or

There is a way to add properties with a .hta file, but I do not think that is the best solution.

Eric
 
 
subject: Mouse hover on TD