How do I make a css class applied to certain table element?

How do I set a css class style so that all hyperlinks in the table block is of certain color and hover action.

eg. red hyper link, hover to green

This will only be effective of this particular table class, to override the global setting for other elements on the same page.
Who is Participating?
Jagadishwor DulalConnect With a Mentor Braces MediaCommented:
First you should define a class for such table. Like

/*write attributes*/
and now you can apply different style
.tablediff .classlink a {
 color:#900;//or your color
.tablediff .classlink a:hover{
 color:#090; //or your color for hover

Open in new window

To implement it:
<table class="tablediff">
<tr><td class=classlink><a href="#">Test</a></td></tr>

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.