WordPress.org

Ready to get started?Download WordPress

Forums

How to change hyperlinks font colour (6 posts)

  1. RossB
    Member
    Posted 4 years ago #

    Just wondering if it's easy to change the colour of hyperlinks in posts, please? Is this something that is done by altering the CSS in the Stylesheet (Editing style.css)?

    If so, what do I look for in order to change the font colour of links, pls? (I don't know any CSS, but I figure if I know what item to look for, once I identify it, I can then work out how to change the link font colour).

    Once the CSS is changed, do all current posts take on that change, or will it only apply to future posts? (See - told ya I don't know CSS!).

    Cheers
    Ross

  2. equaldesign
    Member
    Posted 4 years ago #

    This will depend on your theme however most themes will contain a 'posts' class which all post are contained within. Therefore if you add the following code to the bottom of your themes style.css file it will allow you to change the colour.

    .post a {
      color: #000000;
      text-decoration: none;
    }

    This will make all links black text with no underline. To change the black to another colour replace the hex code above with the hex code of the color you want. To style what happens when you hover over post links use the following:

    .post a:hover {
      color: #006600;
      text-decoration: underline;
    }

    This would make links turn green and underline on hover. Again change the hex code to the required colour.

  3. RossB
    Member
    Posted 4 years ago #

    Thanks equaldesign. Have been flat out and had no chance to check back for replies until now. Will follow up on your advice and get back with results.

    Cheers!
    Ross

  4. RossB
    Member
    Posted 4 years ago #

    Just tried it - works a treat! Thanks a lot, equaldesign.

  5. Stuka
    Member
    Posted 4 years ago #

    I've done it and yet, nothing happens.

    What am I doing wrong? I've added the code (changing the color to #FF6600 (orange)) and nothing's changed. I just typed it at the bottom of the file style.css

    Here is my website: http://www.mmoplayers.com.br

  6. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    very close to the beginning:
    a{color:#807D7A;}

    just to see all linked wordes in orange, try and change it to this:

    a{color:#fc0!important;}

    the !important forces the style on all links.

    (however, if this is to much, and you want to be more specific, you have to scroll through style.css and check every of the many more linked elements.)

Topic Closed

This topic has been closed to new replies.

About this Topic