vlink Doesn't Change Color from Purple

Discussion in 'CSS' started by swoop, Mar 18, 2006.

  1. #1
    Hello,

    My website 39 9 retouch . com (remove the spaces) has this very brief stylesheet style.css:

    BODY { font-family: arial, sans-serif }
    BODY { background: black }
    P { color: white }
    H1 { font-size: large; color: white }
    H2 { font-size: medium; color: white }
    a:link { color:#FFFFFF; }
    a:vlink { color:#FFFFFF; }
    a:alink { color:#FFFFFF; }
    a:hover { color:#FFFFFF; }
    Code (markup):
    The text links that I have visited show as purple, not as white. I don't find anything in the html pages defining their color, so why don't they come out white?
     
    swoop, Mar 18, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Use this syntax;
    
    a:link { color: #fff;}  (or a {color: #fff;})
    a:visited { color: #fff;}
    a:focus { color: #fff;}
    a:hover { color: #fff;}
    a:active { color: #fff;}
    Code (markup):
    You may leave any out that you wish, but they must be in that order, and with those :[values]

    cheers,

    gary
     
    kk5st, Mar 19, 2006 IP
  3. swoop

    swoop Active Member

    Messages:
    469
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    90
    #3
    kk5st, I thought that you were kidding when your examples showed only 3 hex characters for color instead of 6...but it worked! (And 6 did not.)

    In my search of css tutorials I never came across a 3-character color designation.

    Thank you!

    swoop
     
    swoop, Mar 19, 2006 IP
  4. AyeZee

    AyeZee Guest

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Google for "CSS shorthand". Great for reducing the size of your CSS.
    Would have given you a live link but I'm too new to the forum. ;) Hang on though - copy these into your address bar -
    http://www.456bereastreet.com/archive/200502/efficient_css_with_shorthand_properties/
    http://www.webcredible.co.uk/user-friendly-resources/css/css-shorthand-properties.shtml

    I think you'll find the problem was not with you using 6 hex digits, but with the syntax for a:visited.
     
    AyeZee, Mar 19, 2006 IP