1

Bare with me, I am not a programmer, and I'm using the Answers module. I would like to make the background color of the answer content type a different color to distinguish it from the question.

So that when you browse both the question and the answer(s) (which the Answers module shows below the actual question on the same page), they don't look too similar.

I know I can add the field label (of the body of each answer), but I'd like to figure this out.

Any suggestions?

2

Depending on your configuration, there are probably already classes supplied by default with Drupal. Have you used Firebug to check the markup provided by Drupal by default? (video tutorial on how to use Firebug)

If you do need to add a class, one quick way to add a class to a field is the Field Group module. Navigate to the "Manage fields" page for the content type you wish to modify, create a new field group of type div, and then add the class and place the fields you wish to be "in" the class within it.

  • i love firebug even though i admit its a little over my head. i will try the field group module, thank you! – hollyh May 30 '12 at 0:59
0

The newest 7.x-4.0 version of the Answers module comes with the (new) Answers Theme sub-module, which, out-of-the-box, transforms the (rather boring) vanilla display of a Question (and its related Answers below it), into a way more attractive look-and-feel. Such as the orange bubble that is added around the question (to better highlight it). Here is a screenprint that is pretty close to what's included in the newest version:

enter image description here

If you don't enable this sub-module, then you get a similar vanilla display (still). To see it at work, head over to this example question in its demo site).

With this submodule enabled, it might no longer be needed to makeg the background color of the answer content type a different color (to distinguish it from the question to view both the answers and the question on the same page), since they don't look the same anymore, already out-of-the-box. Though you could still adapt the CSS (eg the orange bubble) to fit your preferences.

Disclosure: I'm a co-maintainer of Answers.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.