PDA

View Full Version : forumhead: One different color from the rest.


swisscotton
07-06-2014, 09:10 AM
Can anyone tell me how to change the background colour of different forum sections on the homepage. In firebug this would be the forumhead foruminfo L1 collapse class.

I have looked at the mods for changing the title colour and background color on forums but I don?t think these are what I want. On the in index page I want one section to be a different colour from the rest.

Dave
07-06-2014, 09:28 AM
You should be able to achieve this with the :nth-child(3) selector where 3 depends on the which forum section it is.

cellarius
07-06-2014, 12:12 PM
Why use the child selector, if the categories all have an unique id?

#cat123 .forumhead { color: #123456; }

Where, of course, the 123 in #cat123 needs to be replaced with the actual id of the category (see source code or admincp/forum manager).

Dave
07-06-2014, 12:15 PM
Why use the child selector, if the categories all have an unique id?

#cat123 .forumhead { color: #123456; }

Where, of course, the 123 in #cat123 needs to be replaced with the actual id of the category (see source code or admincp/forum manager).

Because .forumhead is not inside #cat123, it's a sibling.

Lynne
07-06-2014, 03:38 PM
The <div> with class="forumhead foruminfo L1 collapse" is inside an <li> that has an id="catxx", so what cellarius proposed should be possible.

Dave
07-06-2014, 03:46 PM
Oh my bad, I was looking at the ol tags. Should indeed be possible that way.