Grow your CSS skills. Land your dream job.

Weird link-styling problem

  • # July 3, 2013 at 1:43 am

    Hi All, I have a link styling problem. I have an underline on my visited link in FF and Chrome, but not in Opera, and I don’t want that underline to appear at all. Here is the code:

    #content_div a{
    text-decoration:underline;
    font-weight:bold;
    color:#18b9ff;
    }

    #content_div a:visited{
    text-decoration:none;
    color:#383838;

    }

    #content_div a:hover{
    text-decoration:none;
    color:#00ba27;

    }

    I think I have the order right, but the bold and the underline terms from the basic link styling seems to be intruding on the visited terms…I learned this by taking out the underline from the link and that solves the problem…am I doing something wrong here? Why would the specs for the link intrude on the visited link?

    # July 3, 2013 at 2:41 am

    Seemes to be some kind of security issue that you can use to sniff browser history that disabled that css attribute on visited links.

    Read more here:
    [http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/](http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/ “http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/”)

    # July 3, 2013 at 2:46 am

    Ok thanks interesting, thanks for the info adahei. As I said I basically fixed it by removing the underline on the link. Half a cake is better than none :-)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".