TableCell color with an a:visited link. (Almost there. Need a nudge ...)

Discussion in 'CSS' started by contiw, Oct 6, 2006.

  1. #1
    The following css changes the color of an a:visited link text located into a tablecell.

    I would like to change the cell background itself instead of the text background.

    Is it possible?

    Thanks for helping.

    ---------

    <style>

    .tablecell a:link,a:active {
    color: #595984; /* Table cell link text color */
    font-size:2.1em;
    font-weight:bold;
    }


    .tablecell a:visited {
    color: yellow; /* Table cell link text color */
    font-size:2.1em;
    font-weight:bold;
    background-color:gray;
    }

    .tablecell a:hover {
    color: red; /* Color to change table cell link text to on mouse over */
    font-size:2.1em;
    font-weight:bold;
    }

    </style>
     
    contiw, Oct 6, 2006 IP
  2. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well CSS has no parent selector (a deficiency, in my opinion), so you will have to make do with stretching the link to fit the table cell and changing the background of the <a> element.

    .tablecell a { display: block; }
    
    Code (markup):
     
    penagate, Oct 7, 2006 IP
  3. contiw

    contiw Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i m p e c c a b l e !
    Thanks PenaGate.
    Have a nice weekend.
    WalterConti
     
    contiw, Oct 7, 2006 IP