Specifying individual link color

Discussion in 'HTML & Website Design' started by mike323, Nov 9, 2006.

  1. #1
    This is insane. I'm trying to specify a color for an individual link on a search results page (something I've done successfully a thousands time before) and the element doesn't seem to want to recognize the parameters I'm putting into the css for that element.

    I can't change the text color, link color, text size or position of anything within the element labelled "footer".

    I'm trying to change the "disclaimer/about/contact" link at the very top of THIS PAGE to the color white as well as the text next to it (which you cant see because it's black) and the element completely ignores the css.

    I thought this was a fairly simple thing to do and can't see why I'm having trouble. I checked to make sure the search results page is linking to the right css and it is...anyone have any clue what's wrong? Thank you.
     
    mike323, Nov 9, 2006 IP
  2. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just starting to look at your code I notice you have
    .box:visited { font: bold 10px  arial; color: #fff;
    text-decoration: none; }
    .box:active { font: bold 10px  arial; color: #fff;
    text-decoration: none; }
    .box:hover { font: bold 10px  arial; color: #fff;
    text-decoration: none;}
    .box:link { font: bold 10px  arial; color: #fff;
    text-decoration: none;}
    Code (markup):
    It has to be a in a specific order for it to work right. Try something like
    .box:link { font: bold 10px  arial; color: #fff;
    text-decoration: none;}
    .box:visited { font: bold 10px  arial; color: #fff;
    text-decoration: none; }
    .box:hover { font: bold 10px  arial; color: #fff;
    text-decoration: none;}
    .box:active { font: bold 10px  arial; color: #fff;
    text-decoration: none; }
    Code (markup):
    to see if that helps. (I remember this as love-hate.)
     
    Corey Bryant, Nov 9, 2006 IP
  3. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #3
    well, I had tried that already but maybe I got the html specifier wrong...should it be:

    <span class="box">content</span>? If so, it did not work. I also tried <div id="box">content</div>
     
    mike323, Nov 9, 2006 IP
  4. fordP

    fordP Peon

    Messages:
    548
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it should be <span class="box"></span>

    The proper order is: link, visited, hover, active... though I personally don't ever remember having any problems with the order? I see it does matter now though.. hmm
     
    fordP, Nov 9, 2006 IP
  5. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You need to add the class to the <a> tag. CSS cascades, so the <a> tag overwrites the <span> tag
    <a href="http://www.example.com" class="box">Example.com</a>
    Code (markup):
     
    Corey Bryant, Nov 9, 2006 IP
  6. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #6
    Hmmm....I set the code exactly as you explained and it didn't effect anything. :( I know how to change the text color...I'm specifically trying to change the link color to white.
     
    mike323, Nov 9, 2006 IP
  7. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Corey Bryant, Nov 9, 2006 IP
  8. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #8
    Ha Ha..I've got them stumped over there too. Cool forum, though. :D
     
    mike323, Nov 10, 2006 IP
  9. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Corey Bryant, Nov 10, 2006 IP
  10. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #10
    mike323, Nov 10, 2006 IP