Trying to change text properties in css

Last post 02-07-2008 9:50 AM by DisturbedBuddha. 1 replies.

Sort Posts:

  • Trying to change text properties in css

    02-07-2008, 9:37 AM
    • Loading...
    • adamargyle
    • Joined on 12-13-2007, 11:45 AM
    • Posts 44

    I have a problem when trying to set text color, it works in IE, but not in firefox

    I set the color for links:

    a:link {

    color:#d6146b;
    text-decoration:underline;

    }

    But then want to change the color for links when they are in the footer:

    #footer a:link{

    color:#454545;

    }

    html:

    <div id="footer">

    Copyright 2008 All rights reserved | <a href="terms.htm">Terms</a>

    </div>

     

    Why does this not work?

     

     

  • Re: Trying to change text properties in css

    02-07-2008, 9:50 AM
    Answer

    Probably because you are looking at links that you've already visited.

    a:link {...}   only applies to links to pages not already in your browser's history.  If you want those styles to apply to all links, just use    a {...}

    If you want different style for new and visited links, use both   a:link {...}   and   a:visited {...}.   There is also   a:active {...}   for how the link looks as it's being clicked.

    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter