• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

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.
1 Solution
Jagadishwor DulalBraces 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


Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now