How do I change link colour without affecting headlines etc?

  • Unknown's avatar

    If I add links to titles within a post or page, it changes the colour to a default green which I hate.
    I’ve tried:

    .entry-content a {
    colour: xxx;
    }

    and variations of this but that also changes other links that I want to keep the same.

    I would also like to change link colour and hover colour in my widget areas.

    Thanks

    Dawn
    mealsourkidslove.com

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Howdy Dawn!

    Are you referring to mealsourkidslike.com? I don’t see any green links currently on that site, but I do see a link here:

    http://mealsourkidslike.com/about/

    You can change the color of that link with the following:

    .entry-content a {
      color: #000;
    }

    It looks like you used “colour” in your example. Can you give the code above a try? If that doesn’t accomplish what you’re looking for, could you link me to the specific section of your site where I can find the link?

    For widgets, the following should work:

    .widget-area a {
    color: black;
    }

    Please note, these codes are specific to the Forever theme currently on mealsourkidslike.com.

    Also, just a note, we recently published a pretty awesome guide here:

    https://cssworkshop.wordpress.com/

    Just in case you’re looking to learn more about CSS!

  • Unknown's avatar

    sorry, my mistake

    website: mealsourkidslove.com

    thx

  • Unknown's avatar

    It looks like you already have a CSS rule on that page that changes the links to green. You can find that rule under Appearance -> Customize -> CSS:

    .entry-content a {
    	color: green !important;
    	text-decoration: none;
    }

    You should be able to swap out “green” for the hex code you would like. Can you give that a try?

  • Unknown's avatar

    thanks – I’ve been working on this so long I’d forgotten I’d put that in there. no wonder when I tried to enter another .entry-content a instruction it didn’t work.

    Thanks for the help – much appreciated.

    Dawn

  • Unknown's avatar
  • The topic ‘How do I change link colour without affecting headlines etc?’ is closed to new replies.