Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
sarahrab

Change link color on hover and when active

Question

Hi,

I'm trying to change the color of a link, only on hover and when it's active. It currently works properly in my Nav, but I'd like everywhere else, specifically in body text and h2 (for example in the footer and the About page). Links should be black until you hover or they're active, when they should be #FFD801.

I'm using the York template and my site is https://www.sarahrabinovich.com/.

Thanks!

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

@sarahrab Add to Home > Design > Custom CSS

/* Footer Link - Normal */
footer#footer a {
    color: red;
}
/* Footer link - Hover */
footer#footer a:hover {
    color: green;
}
/* Footer Link - Active */
footer#footer a:active {
    color: violet;
}
/* About Page Link - Normal */
body#collection-58951ef9e3df28d5835142f9 .main-content a {
    color: red;
}
/* About Page Link - Hover */
body#collection-58951ef9e3df28d5835142f9 .main-content a:hover {
    color: pink;
}
/* About Page Link - Active */
body#collection-58951ef9e3df28d5835142f9 .main-content a:active {
    color: blue;
}

 


Send me a message if you have any questions (free 10 minutes).

Don't send to forum message. I will check all questions via the link above

Share this post


Link to post
  • 0
56 minutes ago, sarahrab said:

@tuanphan Thanks so much! That worked perfectly. How can I do the same for body text on pages other than the About page?

Replace body#... with Page ID. See my signature to know how to find Page ID.


Send me a message if you have any questions (free 10 minutes).

Don't send to forum message. I will check all questions via the link above

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...