WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Changing link colors in a child theme (3 posts)

  1. Marteens
    Member
    Posted 1 year ago #

    Hi.
    I am using the rumput-hijau-theme, and I have recently made a child theme (for the first time). I want to change the link colors on my site, but when i put this code in the style.css in the child theme:

    a { color: #0645AD !important; }
    a:hover { text-decoration: underline !important; }
    a:visited { color: #551A8B !important; }

    (which I have found in a similar thread), it changes not only the color of the links I have on my site, but also the links in the menu, the header link and the breadcrumb. What can i write to exclude these things in the code?

    Or if it's easier, how do I change the color of the menu links, the header link and the breadcrumb?

    My site.

  2. Tara
    Member
    Posted 1 year ago #

    -Try using Firefox with the Firebug add-on for this kind of CSS work. http://getfirebug.com/

  3. Marteens
    Member
    Posted 1 year ago #

    Thank you! When I first opened that link, it seem way too complicated for me. I am only a beginner. But then I watched this Firebug instruction video, and I saw how easy it is to use. So thank you again, this will surely make it easier to change my homepage in the future.

    By the way, if someone has the same problem I had, the code I finally used is

    #footer-sidebar a { color: #0645AD !important; }
    #footer-sidebar a:hover { text-decoration: underline !important; }
    #footer-sidebar a:visited  { color: #551A8B !important; }
    
    .site-main a: { color: #0645AD !important; }
    .site-main a:visited  { color: #551A8B !important; }
    
    .site-title a: { color: #0645AD !important; }
    .site-title a:visited  { color: #0645AD !important; }
    
    #breadcrumbs a: { color: #0645AD !important; }
    #breadcrumbs a:visited  { color: #0645AD !important; }

Topic Closed

This topic has been closed to new replies.

About this Topic