I'm having a weird issue with the colour of already clicked link colour! (Rocked theme)

Hey guys, I just had a quick question if someone could help?

I’m using the “Rocked” theme and I’m having a weird issue with the colour of already clicked links… and I can’t figure it out for the life of me…

So basically if I add an external link or an anchor link to a post. When I click the link, and it opens in a new tab… When I close the new tab… the link is now a dark blue until I click somewhere on the page and it goes back to the normal colour.

I have tried all of the following and none of them work:

    /* unvisited link */
    a:link {
      color: green;
    }

    /* visited link */
    a:visited {
      color: green;
    }

    /* mouse over link */
    a:hover {
      color: red;
    }

    /* selected link */
    a:active {
      color: yellow;
    }

It’s driving me crazy lol

Thanks in advance for any help!
Martie

Hi Martie,

Perhaps we can suggest you with the better CSS code solution for this. But, I need to try the link first. Can you share a link to the page where it contains the link you’re referring. What does the link read? It would be better if you can point it with a screenshot and upload it here.

Regards,
Kharis
aThemes Support

Okay, I currently have a coming soon page active on this site, as it hasn’t been launched yet.

But here are the screen shots of what I mean:

  1. basic external link (unclicked/no hover)

  1. same link, with mouse hover (slightly lighter green)

  1. same link / after clicking the link and then closing the new window

It’s pretty confusing tbh lol, but I haven’t used this blue/navy colour in any of my css or other edits… it seems to be the themes base colour.

I also noticed it’s the same colour used on the mobile menu dropdown background (I mentioned in my other post)

Here’s a pic of that:

Screenshot 2021-02-05 at 19.37.09

Any help would be greatly appreciated man!
Martie

Hi Martie,

Thank you for sharing the screenshots. Can you try this CSS code:

    .entry-content a:active,
    .entry-content a:visited {
      color: #ff0000;
    }

Regards,
Kharis
aThemes Support

Nailed it! lol Thanks again Kharis, you really helped me a lot with my questions!

1 Like

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis
aThemes Support

Thanks, I used this code, but then realised after it also applied to the buttons (in the Guttenberg editor) it changed the colour of the text of all buttons. So I couldn’t use it in the end.

Thank you though, you’ve been really helpful!

You’re welcome!

You could add specific style for the button block. For example:

    .entry-content a.wp-block-button__link:active,
    .entry-content a.wp-block-button__link:visited. {
      color: #fff;
    }

Regards,
Kharis
aThemes Support