• I changed the color of the font for my links via CSS using a:link. But, I do not want my impact buttons affected by this change.

    Can anyone share with me the CSS code for doing this?

    Thanks in advance!

Viewing 12 replies - 1 through 12 (of 12 total)
  • No way to help with CSS without seeing the site.

    Thread Starter J J

    (@j-j)

    Sorry – https://www.sharedabilities.com

    I changed my link color to blue, but that also changed the color in my “Sign In”, “Register” and “Sign Up Now” impact buttons.

    I used this code to modify my links:

    a:link, a:visited { color: #637FAD !important;}
    #MainMenu .slideMenu ul li a:hover, body #wp-admin-bar ul li ul li a:hover, body #wp-admin-bar ul li ul li:hover ul li a:hover { color: #637FAD !important; }
    a:hover { text-decoration: underline !important; }
    #Wrapper {
    border-top-color: #637FAD !important;
    }

    Why are you using !important? That should only be used if absolutely necessary – usually not. Try removing those.

    Have you asked the developer of your commercial theme for help?

    Thread Starter J J

    (@j-j)

    I did ask the developer of the theme and he sent me to

    https://www.w3schools.com/css/

    If I remove the important, it then does not affect my impact buttons, BUT it also then does not affect my links to posts.

    Thank you in advance!

    Thread Starter J J

    (@j-j)

    Would it help if I remove the ‘important’ so you can see the problem with my posts when it is removed?

    Add (or replace) this and like WPyogi suggested, remove important.

    #TopPanel ul.section-tabs li a.sectionTab:link {
    text-decoration: none;
    color: #000;
    }

    I’d have to agree with the developer – you’ll need to learn some CSS to do this kind of customization.

    I’d also strongly recommend using a tool like Firebug to help you work with CSS.

    Remove the !important and try this code:

    a, a:link, a:visited, #BP-Content .activity-header-info .activity-action a.view, #BP-Content .activity-header-info .activity-action a.delete-activity {
        color: green;
    }

    If that doesn’t work, you might have more luck on a CSS forum such as https://csscreator.com

    Thread Starter J J

    (@j-j)

    Thank you for your help! Code did not work – same problem (links to posts are not changing color) Will go to csscreator.com

    I’m looking at your website and the color is white now. It looks like whatever you did worked.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You may want to remove your !important rules before you cause yourself a headache when you try to override them.

    If you’re struggling to override styles, 9 times out of 10 you can just use more specific selectors to do so.

    Thread Starter J J

    (@j-j)

    Cafesimone – I changed it back to the original way as I had to go out for a bit and did not want it to look ‘funky’. I put it back to the new blue font so you can see the problem. Thanks!

    I will check the specific selectors, thank you Andrew!

    Thread Starter J J

    (@j-j)

    Alternatively, I can take out the !important and add a way to teach the post links to be the new blue (without the !important they remain red, but everything else is ok).

    Thank you again in advance! I am trying to avoid becoming a CSS expert just to make this one change, so any suggested code is MUCH appreciated.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘CSS help for font color for specific links’ is closed to new replies.