WordPress.org

Forums

[resolved] Changing colour of links in Kubrick css without changing color of post title (4 posts)

  1. darylgrove79
    Member
    Posted 8 years ago #

    Hi,

    I'd like to change the colour of my links, but when I do this in style.css the colour of my post titles also changes.

    Is it possible to define the two separately in a Kubrick template? If so, how?

    Thanks,

    Daryl

  2. undertypo
    Member
    Posted 8 years ago #

    Make it more specific.
    Something like this

    #content a { color:#000; }

    This code make all the link within the content will follow the color.

  3. darylgrove79
    Member
    Posted 8 years ago #

    Figured it out by changing this...

    \.post {padding: 0 0 0 3px;}
    .post a, .post a:visited, .post a:active {color: blue; text-decoration: none;} /* TITLE */
    .post a:hover {color: blue; text-decoration: underline;}\

    ...to this...

    \.post {padding: 0 0 0 3px;}
    .post a, .post a:visited, .post a:active {color: blue; text-decoration: none;} /* TITLE */
    .post a:hover {color: blue; text-decoration: underline;}
    .post h2, .post h2 a {color: #000000; text-decoration: none;}
    .post h2 a:hover {color: #000000; text-decoration: underline;}
    .post h2 a:visited {color: #000000; text-decoration: none;}\

    ...adding three lines of code specifically dealing with h2 (the post titles). So now links are "blue" and post titles are "#000000" (aka black).

    Hope this is of help to someone else.

  4. darylgrove79
    Member
    Posted 8 years ago #

    thanks undertypo,

    I posted the reply to myself before I saw your response.

    Would the way I've done it work just as well, or does the \#content\ way have extra benefits?

Topic Closed

This topic has been closed to new replies.

About this Topic