I want to have different colored text on one form and these text items ase setup as a “label” in the form. In the documenation it appears like assigning a classname to these labels should allow me to change the color of the text of each label. I don’t have any problem setting up the style I want to set the label to but the color doesn’t change, if I set the background color in the style it does change so I know I’m accessing the correct style through the classname command but it looks like the font color for the text is getting overridden by something else within the form.
I have a temporary work around by putting a in the label text and this does change the color the way I want it to, I would just rather do it with a classname if possible.
Your example is essentially what I had tried and didn’t have any luck. I went back and tried it again way you have yours and it still didn’t work. I also added a background-color tag because that has always worked and helped me make sure it was picking up the style entry.
When I did this version like yours, it didn’t even show my background color
But when I take the “label” out of the style the background color does change, but the text still doesn’t change.
.myTest{
color: red;
background-color: black;
}
In looking at the DOM in once the page is rendered the myTest style gets applied to a div of “item_label_left myTest” but then right below that is another div “dhxlist_txt_label2” which actually contains the text of the label object. This “dhxlist_txt_label2” div has a color attribute specified on it which I think is over-writing the custom myTest style from the DIV above it.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan