css link format change affected wrong links

  • Unknown's avatar

    Hello all! Thanks for any help. I attempted to change the formatting of my links in my twenty fifteen blog. What I was aiming for was to replace the default link style in the body of posts (underlined and no color changes) to this: teal colored, not-underlined links.

    When I added my code to the css panel, my main body links, within posts, did NOT change, while the tag links in the tag cloud and the footer tags DID change.

    Here’s the code I used:

    a:link {
    color: #599FC1;
    text-decoration: none;
    }

    a:active {
    color: #9B959F;
    text-decoration: none;
    }

    How do I specify “do this in the body of posts and on pages only; don’t do it in the tag cloud or in the footer tags”?

    Thanks!

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

  • Unknown's avatar

    P.S. Since writing this post I discovered what looked like the answer but haven’t been able to get it working.

    I changed the CSS by prefixing this:

    .hentry .entry-content

    The result was that the widget area links and footer links have reverted to default behavior (that’s good) yet the post body links are still at default behavior and not affected by the rest of the CSS change targeting link color.

    Thanks again!

  • Unknown's avatar

    I’ve also tried
    div.entry-content

    So the CSS now reads:

    div.entry-content
    a:link {
    color: #599FC1;
    text-decoration: none;
    }

    a:active {
    color: #9B959F;
    text-decoration: none;
    }

    and still no success (have cleared cache but am not seeing the changes).

  • Unknown's avatar

    Okay, I checked in Chrome and I had the link color working but the underline was still there, so I guessed it was a border and added border: none.

    Now I have the correct behavior in Chrome but not in Firefox. In Firefox now you can’t even see the links in the posts, since the underline (border) is now gone but the color change hasn’t applied.

    I am stumped.

  • Unknown's avatar

    In the end I was led to a solution by someone more knowledgeable than I am. I needed to change “a: link” to just “a” and that made the link color change take effect consistently in both FF and Chrome.

    Also, where I have “active” above, I should have had “hover,” and changing that gave me the behavior I had intended–changing color when someone pauses over a link to see if that’s what it is.

    I know this is very basic, but I help this helps some other puzzled beginner.

  • The topic ‘css link format change affected wrong links’ is closed to new replies.