• Wonder if anyone can help me out?

    NEEDED: Code to just change the link color in the body of posts & pages (and not tags, categories, comments, etc.)

    I am pretty code illiterate and I don’t really know how to navigate the css so if you have some specific changes/ advice, that would be wonderful.

    Thanks!

    website http://www.withoutagym.net

Viewing 15 replies - 1 through 15 (of 18 total)
  • Try using Firefox with the Firebug add-on for this kind of CSS troubleshooting. Or use whatever developer tool is available in your web browser.

    Thread Starter clampitt

    (@clampitt)

    While good advice for a normal person, it is beyond me. Downloaded the Add On and I have been playing around with it but I am unable to see how I am able to affect ALL my posts and pages.

    All I need is this color (e31b22)to replace the current color (666666) for the body of all pages and posts. I can do this but not without affecting the color of other elements (such as tags and comments), so that’s where I’ve been hung up on for a week.

    πŸ™

    You can target CSS to a specific area by changing the selector you are using. Learning basic CSS is not hard – and will be well-worth your time/effort.

    That said, where is an example of what you want to change?

    Thread Starter clampitt

    (@clampitt)

    This post has lots of hyperlinks: http://www.withoutagym.net/start-here/

    And I’ll work on it πŸ™‚

    Try:

    #container #content a, #container #content a:link, #container #content a:visited {
        color: #xxxxxx;
    }

    Above code EDITED – missed syntax on first post.

    Thread Starter clampitt

    (@clampitt)

    It worked but it changes all the other hyperlinks (name, categories,tags) that I dont want changed.

    example: http://www.withoutagym.net/surviving-an-obstacle-course/

    Oh sorry, see if adding this works:

    .postauthor p a,
    .postauthor p a:link,
    .postauthor p a:visited,
    .postmeta p a,
    .postmeta p a:link,
    .postmeta p a:visited,
     {
        color: #999999;
    }

    Change the above to what color you want those name/categories/tags

    Thread Starter clampitt

    (@clampitt)

    I get an unexpected token at the first “{ ”

    What do you mean?

    Where are you adding this CSS? It should go in a custom CSS option or a child theme.

    Thread Starter clampitt

    (@clampitt)

    When I paste it into editor an X comes up at the line with the first ‘{‘

    Saved it but I dont think any changes took hold.

    Try removing the comma before that bracket:

    .postmeta p a:visited,
     {

    Thread Starter clampitt

    (@clampitt)

    Adding it to Appearance > Edit CSS (“CSS STylesheet Editor”)

    Yep, that’s cool – that’s JetPack’s custom CSS.

    Thread Starter clampitt

    (@clampitt)

    K. error went away but code had no effect on links.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Code solely for link color of posts’ is closed to new replies.