using td:hover but only for a specific table.

Posted on 2007-10-06
Last Modified: 2012-05-05
the following works fine in my css stylesheet

     background-color: black;

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?
Question by:scm0sml
    LVL 13

    Accepted Solution

    table.LinksTable td:hover
         background-color: black;
    LVL 13

    Expert Comment

    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 around a part of the html, and there you go!

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
    CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now