Archived topic
Post Title Hyperlink Colours
11 replies · Started by Janine on February 13, 2018
Hi, guys.
How can I get my post titles to be #222 and then change to #0920d5 when a visitor hovers over a post title? Thank you.
Here is a link to my demo site: efc21c12.ngrok.io
Hi there,
Try this CSS to change the hover color of post title:
h2.entry-title a:visited,
h2.entry-title a {
color: #000;
}
h2.entry-title a:hover {
color: #fff;
}
Hi, Leo.
I tried that but I didn't get the effect I'm after.
On the home page, I want post titles to #222. And then when a visitor hovers, it changes to #0920d5. Thank you.
See link to demo site: efc21c12.ngrok.io
The post title color can be set using the customizer (H2).
The hover color should work with the CSS I provided but I'm not seeing it being added.
Hi, Leo.
I'm not sure why you cannot see the code. I can see it when I go into additional css and view source page.
Here is a link to screenshots: https://drive.google.com/open?id=1WQ0qY2sM0LqhKMXqFF-WY4cYFtF5bWul
I also went to Colours > Content > H2 and changed it to #222 and nothing happened. On the homepage, the post title is still in my accent colour and not the 222 I set it to.
I did notice that before I changed H2 in the customizer it was set to inherit (RRGGBB).
Link to demo site: efc21c12.ngrok.io
Thank you!
You had an syntax error above that block of code before which is stopping this block from executing.
Now it's fixed I can see it.
Edited the code above: https://generatepress.com/forums/topic/post-title-hyperlink-colours/#post-495442
Hi, Leo.
I changed the CSS code and still the colour of Post Titles on the homepage is blue rather than the #222.
(It is also #222 in the Customizer for H2.)
Here's a link to the demo site: http://4dbf4fe2.ngrok.io/
Thank you so much!
Weird. Modified the code again. Give it another shot?
Hey, Leo.
Now the Post Title is #222 like I want.
But on hover, I would like to be my accent colour. Thank you.
Link to demo site: http://4dbf4fe2.ngrok.io/
I've separated the hover color out: https://generatepress.com/forums/topic/post-title-hyperlink-colours/#post-495442
Thank you, Leo.
No problem!