Change post link color without changing header and footer link colors.
-
Hi, I am trying to change the color of the post links on my website. Due to the theme colors, my post links aren’t visible. I want the colors to be blue and tried changing them but the name of my blog in the header also changes to blue which I don’t want. Is there a way to change the link colors to blue for only the blog posts and everything else like the blog name to black? Right now I am using some CSS to make it a little bit good but it’s not ideal.
The code I am using right now –
/* A link that has not been visited */ a:link { color: black; } /* A link that has been visited */ a:visited { color: green; } /* A link that is hovered on */ a:hover { color: red; }Can anyone help me with this?
The blog I need help with is: (visible only to logged in users)
-
hi.
I tried this in the dev tool and it worked to target just the post links
.entry-title a:hover { color: red; } .entry-title a { color: blue; }I just picked some outrageous colors
here is the result. https://snipboard.io/U4g2dt.jpg
let us know if it still doesn’t work
-
so when you use the
aselector, it targets every link on your website, rather be specific and include the class or the id of the element you are targeting .. -
Hi there!
Thanks for helping out, @therefoiam!
@bprasad2689, remember that with your plan, you can access Live Chat directly via https://wordpress.com/help/contact. That way, you can get help faster. -
- The topic ‘Change post link color without changing header and footer link colors.’ is closed to new replies.