Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mouse hover on TD

 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>.
 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic