Little CSS help

Permalink
Basically I have a navigation div, in a template, that has tab areas and a content area. They have a colored background - that I need to change the color of depending on the section.

I am using:
$page = Page::getCurrentPage();
$id = $page->getCollectionParentID();

To get the parent ID which gets me the section. So far so good.

The I have a <div class="tabContainer">

and a style sheet which colors the background:

div.tabContainer {background-color:#23a7c0; etc...

The tabContainer div has other styling applied, but I only want to change the background-color. I am using JQuery and code in there affects the tabContainer div - so I can't have a second tabContainer2 style.

I thought I could do something like so in the style sheet:

div.tabContainer2 {background-color:#e49f15; }

and then using php add/override the color like so:

The I have a <div class="tabContainer tabContainer2">

But that doesn't affect the color like I thought it would.

I hope it makes sense what I want to do - change the bg color of a div with php, but keep the original styling intact - only touching the color.

thanks

 
PassionForCreative replied on at Permalink Reply
PassionForCreative
If you go to this post:http://www.concrete5.org/community/forums/themes/custom-class-for-e... and search for the Best Answer by Jordanlev you should be OK.

I've used it on a site successfully. Hope that helps