Contextual selector for anchor link in table

Discussion in 'CSS' started by cma6, Mar 29, 2007.

  1. #1
    I have a large table with the id of "itemtable" like this:
    table cellpadding="0" cellspacing="0" id="itemtable" summary="Main content"

    The cells have a class of "details" like this:

    td class="details"
    #6383 $6,000 Reserved

    Gallenga stenciled velvet jacket, 1920s. Fashioned from luxurious
    burgundy silk velvet that drapes in sensual folds. The dramatic cocoon shape with cut-in-one
    sleeves emphasizes the exotic design. With a rare Gallenga stenciled signature! NEW LISTING

    I want to be able to style an anchor link like the one for "Hope dress". The anchor is within a table with the id "itemtable" and within a cell with the class "details". I gave the anchor an additional class of "bd" but that doesn't do it.

    The style sheet does have selectors for anchor links outside the table like this:
    a:link{color:#000;background-color:#fff;text-decoration:none;}
    a:visited{color:#8B0000;background-color:#fff;text-decoration:none;}
    a:link:hover,a:link:active{color:red;background-color:#fff;text-decoration:none;}

    But these are irrelevant to my purpose. For the anchor links within the table cells, I want the same styles as above with the exception of a:link{color:blue;

    You can see the page live here as the 4th one down (#2135) on this page:
    http://www.vintagetextile.com/1920s.htm

    As you can see, the Hope link has color:#8B0000; so it may be picking it up from the anchor styles outside the table, but that's just a guess.

    Thanks in advance for your help, CMA
     
    cma6, Mar 29, 2007 IP