oenter code hereDrupal 6:

I have a form (inherited site) and one field named "Status" shows the word New in red and Production in green.

Inspecting the field in Firebug, the class is generic:

<div class="field-item-content" style="font-weight: bold; color: rgb(204, 0, 0);">New</div>

and obviously has that inline css. I cannot find where in Drupal or anywhere in the css files where to change that.

I have added a new field "Features" and want to colorize the text that appears as the value but the class is:


Which is too generic. I don't want to get too complicated with my selectors for browser compatibility and using jquery to tag it seems overkill.

I saw a thing drupal.org about using the field name as the class, but as seen, that class doesn't appear, just the generic class.

So I'm trying to figure out where that inline css could have been added and where I can do the same. It has to be somewhere as in the example, two different words have different colors.

  • I think that inline is being added by a js script. How about altering field by implementing theme_field() specific for that field? Or you can use hook_preprocess to achieve your desire. – ninjascorner Apr 26 '13 at 2:08
  • Thanks for the idea. Despite my five month ramp-up on Drupal, I haven't had to use preprocessing or specific functions yet in my themeing. So with the theme_field().. that is where I could use the actual name of the field in Drupal? In this case, field_product_features? That's how I can 'tag' it first before it is rendered to that generic class above? – kelly johnson Apr 26 '13 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.