How Do You Change the Color of My Text Links Globally?

Posted in: Newspaper
Post count: 24

Hello:

I would like to change the color of my links from red to blue throughout my site CrossIceHockey.com. I searched the forum and read that I could do that by adding the following to my CSS:

.single-page .td-page-content a:link {color: #0066cc;}
.single-page .td-page-content a:visited {color: #800080;}

I tried to add the above code, but the braces on the second string of code produced an error (they were showing up in red in the editor).

What is the correct way to change the color of the text links from red to blue for all the posts in my site?

Thank you.

Post count: 27744

Hello,

You can try to use this code
.single .td-container a:link {
color: blue;
}
.single .td-container a:visited{
color: #12a;
}

Set the code in Theme Panel -> Custom Code -> Custom CSS.

Thank you!

Post count: 24

Hi, Anamaria:

Thank you for your reply. I added the code and it worked. However, every one of the links were affected, including the social media icons, etc.

How would I just limit changing the color of the links is just the post content only?

Post count: 20688

Hi,

Normally the predominant color throughout the website, including for links, is the theme accent color set in the theme panel https://i.imgur.com/2qHmmeI.png
You could change that to what you want a different color than what is set now, which is this color https://i.imgur.com/Df2CCWq.png

Or perhaps you don’t want to change the accent color for various reasons, like wanting to change the color only for some elements, or in specific places. Then it can be done with some CSS, but those specific elements or locations will have to be targeted directly. It has to be known what elements those are and where they are or else the code may affect other unwanted elements. The code from above is more general, it affects mostly ever link everywhere in the post page.

Let me know.

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.