Targeting a specific widget title with CSS

On my wordpress powered website I have widget title boxes if you have a look you will see I have a one titled 'british lions' in the left sidebar on the right hand side of the website.

This is a category widget and will only show posts from that category. I would like to change the title box from green to red to match the 'british lions' style.

I will then add more of these widgets but they will be pulling from different categories and will also have their own color style. You will see what i mean on the main content on the front page aviva is yellow super rugby is blue etc etc but i want this for the widgets aswell.

How do i target the specific widget boxes with css to change the background. I have tried with firebug but it seems to change all the widget title boxes and not that specific one i am after.

Hopefully someone can help and i am making sense.



It is possible. Let us take the 'British Lions' tab here for instance.

#feacpost_featuredcategorypostswidget-2 h3 {
    background-color: #ff0000 !important;

Take this css and put it inside your own stylesheet.

I hope this helps.

you can access it by its id #feacpost_featuredcategorypostswidget-2.

so you could add something like

#feacpost_featuredcategorypostswidget-2 h3 {
    background-color: #b22023;

to your CSS.

Need Your Help

Android, retain values in Singleton for Background service

android singleton intentservice

I have an intentService in my application that is scheduled to be called every 5 minutes. In that service I am using values shared with the rest of the app (Strings, int..). I am using Singleton to...

Choose default type and encoding for C++ string literals at compile time

c++ c++11 unicode character-encoding string-literals

C++11 introduced the new string literals for UTF-8, 16 and 32 with the u8, u and U prefixes but I have to hard code which one I want to use. I'm looking for a way to select which encoding I want to...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.