change in color of links in Twenty-Twelve

  • Unknown's avatar

    I changed the CSS sheet as shown below to get new colors for links. The change took for unused links. But visited links remain in grey (I think it’s #5a79a5;).

    What did I do wrong?

    a:link {
    color: #3366ff;
    }

    a:visited {
    color: #0000ff;
    }

    a:hover {
    color: #3366ff;
    }

    The blog I need help with is: (visible only to logged in users)

  • Change

    a:visited {
    color: #0000ff;
    }

    to

    .entry-content a:visited, .comment-content a:visited {
        color: #00f
    }

    In CSS more specific rules take effect. The second rule is more specific than the first rule so it applies. The rule you added initially was not specific which is why it did not change the visited link color.

  • Unknown's avatar

    Thanks! That worked perfectly. CSS is more complex than it looks from the CSS help websites.

    Since you know this well, how do I change the color of the side menu? Twenty-Twelve comes with a standard silver that’s quite difficult to read.

    I’ve tried some code, without success.

  • Do you mean you want to change the background color of right hand side widget area?

    Try this to start with and we can fine tune depending on your preference:

    .widget-area {
        background:gray;
        color:white;
    }
    
    div#secondary a, .widget-area .widget h3{
        color:white;
    }
  • Unknown's avatar

    Apologies. I was still talking about link colors — changing those on the side menu.

    But I did want to change the background color, also. So that’s useful information!

  • Alright. In the earlier CSS, change the value of the color attribute from white to your preferred color, either name or hex code :-)

  • Unknown's avatar

    Thanks!

    And how to change the link colors on the sidebar menu?

  • Here are the current styles for the links in the widget area, and their visited and hover styles.

    .widget-area .widget a {
    	color: #4E3F30;
    }
    
    .widget-area .widget a:visited {
    	color:#9f9f9f;
    }
    
    .widget-area .widget a:hover {
    	color:#668477;
    }

    Change the colors to your preference.

  • The topic ‘change in color of links in Twenty-Twelve’ is closed to new replies.