Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
905 views
in Q2A Core by

For instance. I have this:

 

.qa-browse-cat-link {
    cursor: pointer;
    background-color: #c0392b;
}

How to change this piece of code to change only the given cathegory?

Q2A version: 1.7.0

1 Answer

+1 vote
by
selected by
 
Best answer

1. Inspect the source code of the category webpage and locate something like this:

<li class="qa-browse-cat-item qa-browse-cat-pasta">

In this case, the category I'm looking for is "Pasta"

2. Apply the following CSS rule:

.qa-browse-cat-pasta {
    cursor: pointer; 
    background-color: blue; 
}

You can target specific elements to apply the background-color or color like this .qa-browse-cat-pasta span.

by
This works very well! However, to keep the consistency I also have to change the right side that now is ".qa-browse-cat-note a". This is a class inside the ".qa-browse-cat-pasta". How do I deal with this?
by
Just target that particular element:

.qa-browse-cat-pasta .qa-browse-cat-note a  {

If you're using SnowFlat, don't miss this one either:

.qa-browse-cat-pasta .qa-browse-cat-note a:before {
...