CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Which file to edit for .crm-section class?
Pages: [1]

Author Topic: Which file to edit for .crm-section class?  (Read 380 times)

midts

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.2
Which file to edit for .crm-section class?
February 19, 2014, 09:36:35 am
Hi. New here. I am editing some custom Contribute page/form, don't know if that's the right place I am looking at, but I need to add wrappers for some labels and inputs, that are inside crm-group -> crm-profile -> crm-section -> and inside .content div I have multiple inputs and labels that needs wrapping so I could style them, now they all messed up.

So which file should I be looking at?

midts

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Which file to edit for .crm-section class?
February 21, 2014, 02:13:11 am
Oh come on, nobody knows? How do I wrap these up each to separate div/class so I could style them? Now this selection form is a mess!


Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Which file to edit for .crm-section class?
February 21, 2014, 04:38:49 am
You can edit your own CSS file, and use CSS to override the default styles. You can do this in your theme file etc, or in a new CSS file you include from theme / module / whatever.

To answer your original question, "which file to edit for .crm-section class?" - civicrm.css probably creates the default rules you're seeing. Here's how to find that out for yourself:
  • Visit your page (eg http://drupal.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=1) and right-click on the text "Do you love CiviCRM".
  • Select "Inspect element", and see https://dl.dropbox.com/s/8dlvahsm2qharhv/Screenshot%202014-02-22%2001.38.21.png
  • Note the left lower pane where you can see the selected element highlighted.
  • Note the right lower pane where you can see the CSS file, the line of the various CSS rules, and the styles applied from the rule.

If you're looking for "which template should i edit", just search the templates in civicrm/templates. I'd use grep myself, but you can also search the CiviCRM code on github: https://github.com/civicrm/civicrm-core/search?q=.crm-section&ref=cmdform
« Last Edit: February 21, 2014, 04:45:56 am by Chris Burgess »
@xurizaemon ● www.fuzion.co.nz

midts

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Which file to edit for .crm-section class?
February 21, 2014, 06:02:52 am
Yes, that's what I meant, which template/php file to edit so I could add a div wrapper to those elements I showed in the screenshot. But I still can't find out which file that is.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Which file to edit for .crm-section class?

This forum was archived on 2017-11-26.