color of a widget heading

  • Unknown's avatar

    The headings of all of my widgets should be (and used to be) green. Now, the heading of one of my widgets — the tag cloud widget — is black instead of green. I am not sure what’s up. It has been awhile since I wrote this code to make the headings green:

    ul.xoxo li#wp_tag_cloud div a {
    text-decoration:none;
    }

    ul.xoxo li#wp_tag_cloud h3 {
    color:#008800;
    }

    Can you figure out what’s up?

    Thank you for your help!
    Amy

  • Unknown's avatar

    You’re using a few rules like this:

    ul.xoxo li#twitter-3 h3 a {
    	color: #080
    }

    And that is very specific, so it only applies to list containers with a class of “xoxo” and list items with an id of “twitter-3” followed by an h3 heading that is a link. That particular block of CSS doesn’t actually affect any of the widget titles on your blog at the moment because none of the titles are links.

    If you use something more general like this instead:

    .widget-title {
    	color: #080;
    }

    It will cover all your current link titles. If you were to add a widget in the future that has a title that is also a link, this would probably cover both types of titles:

    .widget-title,
    .widget-title a {
    	color: #080;
    }
  • Unknown's avatar

    Thank you! That worked. I learned a very small amount of CSS when I created my blog a few years ago, and I now forget everything. I appreciate your help. -Amy

  • Unknown's avatar

    It’s fun isn’t it?? I love it.

    I hope you’re having fun with your blog! The sock monkey reading a book in the header image on http://delightfulchildrensbooks.com/ is kind of awesome. :)

  • The topic ‘color of a widget heading’ is closed to new replies.