WordPress.org

Ready to get started?Download WordPress

Forums

Visited links don't have the expected color (5 posts)

  1. jakobrosenkrantz
    Member
    Posted 1 year ago #

    My homepage is

    http://www.jakobrdl.dk

    and it is based on a child theme of the Twenty Twelve Theme. Until recently, possibly until I updated WordPress and the associated themes, links on my homepage all had the same blue color, whether they had been clicked or not. But now the clicked (or visited) links have a grey color, and I don't understand why.

    The style.css file of my child theme looks as shown below, and if I change the settings for "a:link" and for "a:hover", the appearance of the links changes - but nothing in this file seems to change the way visited links appears.

    So are the visited links being overwritten somewhere? If yes, where? Or is there another explanation?

    Thanks in advance for the help.

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      http://jakobrdl.dk/
    Description:    Child theme for the Twenty Twelve theme
    Author:         Jakob Rosenkrantz de Lasson
    Author URI:     http://jakobrdl.dk/
    Template:       twentytwelve
    Version:        1.0.0
    */
    
    @import url("../twentytwelve/style.css");
    
    a:link {
        color: rgb(10,57,165);
        text-decoration: none;
    }
    
    a:visited {
        color: rgb(10,57,165);
        text-decoration: none;
    }
    
    a:hover {
        color: rgb(10,57,165);
        border-bottom: 1px dotted;
    }
    
    a:active {
        color: rgb(10,57,165);
        border-style: none;
        text-decoration: none;
    }
    
    <style type="text/css">
    #wrap {
       width:100%;
       margin:0 auto;
    }
    #left_col {
       float:left;
       width:70%;
    }
    #cen_col {
       float:left;
       width:10%;
    }
    #right_col {
       float:right;
       width:20%;
    }
    </style>
  2. jrav001
    Member
    Posted 1 year ago #

    Line 801 of the twentywelve style.css has this:

    '.entry-content a:visited, .comment-content a:visited {
    color: #9F9F9F;
    }'

    So you can add that your child, using the correct color.

  3. jakobrosenkrantz
    Member
    Posted 1 year ago #

    Thanks, jrav001, that solved the problem!

    What puzzles me, however, is why "a:link" and "a:hover" could be set as indicated in my first post, while this same code did not work for "a:visited"; do you have an explanation for that?

  4. jebswebs
    Member
    Posted 1 year ago #

    I am having the same issue since TwentyTwelve updated. I just set up a TwentyTwelve-child theme and tried to reset the colors of the links. But the base color (a:link)and hover (a:hover) works correctly, but the visited (a:visited) stays the same ugly and illegible gray (I hate gray text - poor accessibility and poor usability). The only thing different is I am using hex code and not rgb. I'll try RGB next. Ugh!

  5. jebswebs
    Member
    Posted 1 year ago #

    That did not work.

    See http://mainecla.org/

    Very frustrated...

Topic Closed

This topic has been closed to new replies.

About this Topic