Support » Fixing WordPress » I can't make visited links change colour

  • I’m a WordPress beginner, constructing a non-blog site link. I’m currently using theme TwentyEleven Child with sidebar (Niraj) – though I may change this. I want visited links on my pages to change colour. I found an instruction to change the style.css file for my theme, and did so ny adding the following at the end –

    #content .entry a:visited {
    #content .entry a:hover{color:#f00;}
    #content .entry a:active,#content .entry a:focus {color:#0f0;}

    But it has made no difference. Can anyone help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Michael


    Forum Moderator

    try either:

    #content .hentry a:visited { ... }


    #content .entry-content a:visited { ... }

    (there is a small difference between the two – .hentry would include the post title as well…)

    Thanks for the speedy reply, alchymyth. But I’ve tried both .hentry and .entry-content in place of .entry, and neither of these work either. 🙁



    Forum Moderator

    sometimes you need to clear the broswer cache to get the changes to see immediately – for instance with ‘CTRL F5’ for PC users.

    i could see the pink color for the visited link; with a hover color of red.
    however, it is also possible that this :focus style
    #content .entry a:active,#content .hentry a:focus {color:#0f0;}
    is interfering with the :visited and :hover styles, as it is added after the other styles.

    Thanks again! It all works OK now.

    Seems it’s to a certain extent a browser issue. Even with the original “.entry” it works fine in MSIE. In Firefox, it didn’t work with “.entry” but worked with “.hentry” once I had cleared the cache – but I had to go into “Options” to do that, F5 did not seem to work.

    The only thing I’d like to know now is where to change the default, unvisited link colour if I wish – it does not seem to be in style.css



    Forum Moderator

    where to change the default, unvisited link colour

    the ‘general’ link styles are about one-quarter down in style.css of Twenty Eleven:

    /* Links */
    a {
    	color: #1982d1;
    	text-decoration: none;
    a:hover {
    	text-decoration: underline;

    Many thanks! I need to read up on CSS syntax – I was looking for “:link”!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I can't make visited links change colour’ is closed to new replies.