CSS link color problem

Discussion in 'HTML' started by Kathleen Coyne, Jul 3, 2003.

  1. For some reason, I just can't change the font color for hover. It
    allows me to change the background color, no problem. But, if the
    link is visited, it will not change the font color, if the link is
    unvisited, then it will change the font color on hover.

    Here is my CSS

    #content a:link {
    color: #CACBCA;
    font-weight: bold;
    }

    #content a:hover {
    background-color: #ffffff;
    color: #048004;
    font-weight: bold;
    }

    #content a:visited {
    color: #CACBCA;
    font-weight: bold;
    }

    any ideas?
    Kathleen Coyne, Jul 3, 2003
    #1
    1. Advertising

  2. Kathleen Coyne

    Steve Pugh Guest

    (Kathleen Coyne) wrote:

    >For some reason, I just can't change the font color for hover. It
    >allows me to change the background color, no problem. But, if the
    >link is visited, it will not change the font color, if the link is
    >unvisited, then it will change the font color on hover.
    >
    >Here is my CSS
    >
    >#content a:link {
    > color: #CACBCA;
    > font-weight: bold;
    > }
    >
    >#content a:hover {
    > background-color: #ffffff;
    > color: #048004;
    > font-weight: bold;
    > }
    >
    >#content a:visited {
    > color: #CACBCA;
    > font-weight: bold;
    > }


    If a link is visited and being hovered then which rule is applied? The
    one specified last in the CSS. Swap the two rules around and hover
    will apply to visited as well as unvisited links.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jul 3, 2003
    #2
    1. Advertising

  3. Kathleen Coyne

    PeterMcC Guest

    Kathleen Coyne wrote:
    > For some reason, I just can't change the font color for hover. It
    > allows me to change the background color, no problem. But, if the
    > link is visited, it will not change the font color, if the link is
    > unvisited, then it will change the font color on hover.


    It's the cascade that's doing it - define them in the order
    link
    visited
    hover
    active

    Currently, your visited definition comes after the hover so a visited link
    that gets hovered has to decide on whether it will display as visited or
    hovered - the latter definition takes precedence so you get a visited
    appearance.

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
    PeterMcC, Jul 3, 2003
    #3
  4. Kathleen Coyne

    Mike Guest

    <style>

    <!--
    A:link { color: #808080; text-decoration: none}
    A:active { color: #808080; text-decoration: none}
    A:visited { color: #808080; text-decoration: none}
    A:hover { color: #FF0000; text-decoration: none}

    -->
    </style>

    -Mike

    "Kathleen Coyne" <> wrote in message
    news:...
    > For some reason, I just can't change the font color for hover. It
    > allows me to change the background color, no problem. But, if the
    > link is visited, it will not change the font color, if the link is
    > unvisited, then it will change the font color on hover.
    >
    > Here is my CSS
    >
    > #content a:link {
    > color: #CACBCA;
    > font-weight: bold;
    > }
    >
    > #content a:hover {
    > background-color: #ffffff;
    > color: #048004;
    > font-weight: bold;
    > }
    >
    > #content a:visited {
    > color: #CACBCA;
    > font-weight: bold;
    > }
    >
    > any ideas?
    Mike, Jul 3, 2003
    #4
  5. Kathleen Coyne

    T.J. Guest

    "Kathleen Coyne" <> wrote in message
    news:...
    > For some reason, I just can't change the font color for hover. It
    > allows me to change the background color, no problem. But, if the
    > link is visited, it will not change the font color, if the link is
    > unvisited, then it will change the font color on hover.
    >
    > Here is my CSS
    >
    > #content a:link {
    > color: #CACBCA;
    > font-weight: bold;
    > }
    >
    > #content a:hover {
    > background-color: #ffffff;
    > color: #048004;
    > font-weight: bold;
    > }
    >
    > #content a:visited {
    > color: #CACBCA;
    > font-weight: bold;
    > }
    >
    > any ideas?


    Remember,

    Luther
    Vandross
    Has
    Acne
    T.J., Jul 3, 2003
    #5
  6. Kathleen Coyne

    P@tty Ayers Guest

    > Remember,
    >
    > Luther
    > Vandross
    > Has
    > Acne



    LoVe - HA! :)


    --
    P@tty Ayers
    http://www.WebDevBiz.com
    Web Design Contract, Estimate Worksheet
    --
    P@tty Ayers, Jul 4, 2003
    #6
  7. In article <be283t$van$>, lid says...
    >
    > "Kathleen Coyne" <> wrote in message
    > news:...
    > > For some reason, I just can't change the font color for hover. It

    ....
    > > any ideas?

    >
    > Remember,
    >
    > Luther
    > Vandross
    > Has
    > Acne
    >

    For some reason 'links is over active' sticks in my mind:

    _link_s
    v_is_ited
    h_over_
    _active_
    Jacqui or (maybe) Pete, Jul 4, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    794
    Kevin Spencer
    May 17, 2005
  2. Matt Adams
    Replies:
    0
    Views:
    873
    Matt Adams
    Aug 26, 2003
  3. Janet
    Replies:
    5
    Views:
    4,712
    Jonathan N. Little
    Mar 17, 2005
  4. fig000
    Replies:
    0
    Views:
    4,531
    fig000
    Sep 6, 2004
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    379
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page