Change color of just one link…

  • Author
    Posts
  • #872249

    morningedit
    Member

    Hi,

    Can anyone help me – please – I’m using the theme Tarski and I’d like to change the color of the post title. The only way I can work out how to do it is by changing the color in the links section – CSS as follows:

    a {
    text-decoration: none;
    }
    a:link, a:visited, a:active {
    color: #006a80;
    }
    a:hover {
    color: #a8001c;
    }

    .content a:link, .content a:active, .content a:visited, .post-content a:link, .post-content a:active, .post-content a:visited, .comment-content a:link, .comment-content a:active, .comment-content a:visited, #blurb a:link, #blurb a:active, #blurb a:visited, .recent p a:link, .recent p a:active, .recent p a:visited {
    border-bottom: 1px solid #cfe2e5;
    }
    .content a:hover, .post-content a:hover, .comment-content a:hover, #blurb a:hover, .recent p a:hover {
    border-bottom: 1px solid #e5cfd2;
    }
    body .content h3 a:link, body .content h3 a:visited, body .content h3 a:hover, body .content h3 a:active, body .post-content h3 a:link, body .post-content h3 a:visited, body .post-content h3 a:hover, body .post-content h3 a:active, body .post-content h4 a:link, body .post-content h4 a:visited, body .post-content h4 a:hover, body .post-content h4 a:active {
    border: none;
    }

    But if I change the color here it changes all of the links on the whole site to a different color. I just want to change the post title/heading – please can someone tell me in really simple terms how to do it?

    Thanks

    The blog I need help with is morningedit.wordpress.com.

    #872586

    aerych
    Staff

    Hi there,

    It looks like you can target just the link in the post title by specifying the post-title class in your CSS selector. Like so:

    h2.post-title a {
     color:#0000FF;
    }
    
    h2.post-title a:hover {
     color:#00FF00;
    }
    
    h2.post-title a:active {
     color:#FF0000;
    }

    Of course you’ll want to choose your own colors :)

The topic ‘Change color of just one link…’ is closed to new replies.