IE is ignoring my a:visited rule

Discussion in 'CSS' started by anthony.zepezauer, Oct 26, 2010.

  1. #1
    I have these rules:

    .SmallLink{
    color : #blue;
    background : transparent;
    text-decoration: none;
    font-size : 10px;
    }

    .SmallLink:VISITED {
    color : #blue;
    background : transparent;
    text-decoration: none;
    font-size : 10px;
    }

    .SmallLink:HOVER {
    color : #blue;
    background : transparent;
    text-decoration: underline;
    font-size : 10px;
    }

    and these two links (among others)

    <a href='#' onClick='launchSupport();'>_____ Support web site</a>

    <a href='mailto:_____Support2@________.com'>______ Support</a>

    The links are properly blue when the page first loads, but change to purple after they have been clicked on. Why? Shouldn't the visited state look the same as unvisited, based on the rules above? (BTW I tried in FF and got the same result, so it's not confined to IE. But this is for a company intranet and only IE is supported, so that's all I care about (right now).

    Any help is appreciated. Thanks!
     
    anthony.zepezauer, Oct 26, 2010 IP
  2. scriptinstaller

    scriptinstaller Peon

    Messages:
    109
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    wierd css

    if you are in a class of something

    use
    .class a:visited {
    color: #fff;
    }

    i wouldnt do like

    .smallblue {
    }

    because your class ID's could override that value anyhow
     
    scriptinstaller, Oct 26, 2010 IP
  3. scriptinstaller

    scriptinstaller Peon

    Messages:
    109
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    so i reexplain in simple terms

    i wouldnt do <a class="foo" href="">

    I would do

    <div class="section">
    blah
    blah
    blah
    <a href="">link here</a>
    blah
    blah
    blah
    </div>

    and define section a:link, a:hover, a:visited etc
    or use the default
    a:link, a:hover, a:visited etc
    if no need special class link colors are needed
     
    scriptinstaller, Oct 26, 2010 IP
  4. anthony.zepezauer

    anthony.zepezauer Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Fixed! Thanks very much for the quick response, scriptinstaller.
     
    anthony.zepezauer, Oct 26, 2010 IP