Return to Support

How to have different colors for links on sidebars, homepage panes, and posts.

Home Forums Graphene WordPress theme Support How to have different colors for links on sidebars, homepage panes, and posts.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2867
    Feezle
    Member

    Due to the different colors that I am using for sidebar background, main wrapper background, and the background in a blog post, I need to use a different color for links in each location. I have searched the forum and unfortunately couldn’t find what I’m looking for. I’m assuming I need to add new custom CSS values. Can anyone help me with this? If there is already a thread on it, feel free to point me there.

    thanks so much!

    #22319

    I’m assuming I need to add new custom CSS values.

    Yes, you do. But you need to target each section. See this link for how to target items by the unique ID number that WordPress gives to everything:

    http://blog.kjodle.net/2011/12/05/fun-with-text-widgets-part-two/#Styling_Text_Widgets_by_Targeting_their_ID

    That refers specifically to text widgets, but if you look closely, you’ll find that everything has the same numbering scheme applied to it.

    The code you will need to use will differ a bit from what’s in that tutorial. Instead of this:

    #text-7 {
    text-align: center;
    background:blue;
    }

    you would need to do this:

    #text-7 a, #text-7 a:visited, #text-7 a:hover, #text-7 a:active {
    text-align: center;
    background:blue;
    }

    (Note: anchor links must be listed in that order, or the css will not work correctly.)

    Cheers,

    Ken

    #22320
    Feezle
    Member

    That helps a lot. Thank you! I will give it a shot tonight.

    #22321
    Feezle
    Member

    I tried using firebug to get the ID and when it comes to changing the link color in all single posts, I can’t figure out how I would identify the ID since each post has a different ID. That I want to change is the entry-content clearfix I believe. How would I identify it?

    <div id="post-6" class="post-6 post type-post status-publish format-standard hentry category-test2 clearfix post">
    <div class="date updated">
    <div class="entry clearfix">
    <h1 class="post-title entry-title">
    <div class="post-meta clearfix">
    <div class="entry-content clearfix">

    #22322

    all single posts

    If you want all links in all posts to all be the same color, you can use the code I gave you like this:

    .entry-content a, .entry-content a:visited, .entry-content  a:hover, .entry-content  a:active {
    style info;
    }

    I thought you meant that these:

    sidebar background, main wrapper background, and the background in a blog post, I need to use a different color for links in each location.

    were all going to be different (i.e., you were going to style each widget in each sidebar differently). If that’s not the case, ignore the targeting by ID information I gave you earlier and you can just go with I just posted here.

    This thread:

    https://forum.graphene-theme.com/graphene-support/color-of-sub-menus#post-13841

    has links to my style sheet. You can peek there and see if any of what I have done helps you figure some other things out.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.