How do I change the text color of recent posts shortcode on hover from red to gold?

Good Morning,
I’m wondering how I can change the text color of the recent posts shortcode on hover from the default red to gold. Below is the shortcode and edited CSS global code.

Shortcode:
[recent_posts count=“3” no_image=“true” orientation=“vertical”]

Global CSS:
.x-recent-posts .h-recent-posts {
margin: 0.5em 0;
color: black;
}
.x-recent-posts .h-recent-posts:hover {
color: rgb(175, 147, 19); /Trying to change to this text color on hover./
}
.x-recent-posts .x-recent-posts-date {
display: none;
}

You can view more at monticellomusic.wonderwhat.co. Thank you for your help.

Hi There,

Please try with this custom CSS instead:

 .x-recent-posts a:hover .h-recent-posts {
     color: rgb(175, 147, 19); 
}

If you would like to learn CSS, I am sharing few resources that you take a look to get started with CSS and an interesting tool that you can use to speed up the development process.

I recommend you to watch following video that will help you to get started with CSS.

https://www.youtube.com/watch?v=MFR4WXiLzpc

Sometimes it can get a bit difficult to find out the right selector to be able to write the required CSS codes. A handy tool that can help you in this is Google Chrome dev tools. I am sharing the resource that you can refer to get started with dev tools.

https://developers.google.com/web/tools/chrome-devtools/css/

https://developers.google.com/web/tools/chrome-devtools/

https://www.youtube.com/watch?v=tP_kXBJWPhQ&t=200s

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.