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

using td:hover but only for a specific table.

the following works fine in my css stylesheet


td:hover
{
     background-color: black;
     color:Yellow;
}

the only problem i have is that all cells on the page are changing color.

I only want it to work for cells of a specific table:
<table class="LinksTable" etc etc

How do I do this?
0
scm0sml
Asked:
scm0sml
  • 2
1 Solution
 
R7AFCommented:
table.LinksTable td:hover
{
     background-color: black;
     color:Yellow;
}
0
 
R7AFCommented:
Using table.LinksTable you can make all css in that table customized.

table.LinksTable p { color: green; }
table.LinksTable a { color: red; }

You can do the same with a div of course. Just put a div.abc around a part of the html, and there you go!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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