Change link font colors in posts only-not header-using Sapor
-
I am using Sapor theme and need CSS to target the color of the links inside my post content – but not the headings. I’ve tried several things unsuccessfully already. I am CSS illiterate, so please make your responses on a “for dummies” level. Thank you.
https://bmshouston.wordpress.com
The blog I need help with is: (visible only to logged in users)
-
Hi there!
You can target the links inside your posts with this code:
.entry-content a, .entry-content a:visited { color: red; }.entry-content is going to be that specific part of the page, so it shouldn’t touch the headers. This is set up to target normal links (.entry-content a) and links that the viewer has already visited (.entry-content a:visited).
Obviously, you’d want to replace the ‘red’ with your color of choice :)
A couple of links that you might enjoy that will help you get started with CSS:
https://en.support.wordpress.com/custom-design/css-basics/How to find elements (like the .entry-content I used above):
https://en.support.wordpress.com/custom-design/how-to-find-your-themes-css/ -
Hi chad1008!
Thank you for your prompt reply. I tried this code in the custom css box and changed ‘red’ to ‘purple’. Worked like a charm! If I want to be more specific with my color choice, can I adjust this code to accept a color like ‘996bcb’?
This really helps for now! Thanks again! :)
-
- The topic ‘Change link font colors in posts only-not header-using Sapor’ is closed to new replies.