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 (Moderator: Dave Greenberg) »
  • theming of custom data input form on a user profile
Pages: [1]

Author Topic: theming of custom data input form on a user profile  (Read 2968 times)

carolineb

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 2
theming of custom data input form on a user profile
November 30, 2009, 12:23:16 pm
Hi

I have civicrm up and running quite well and have it integrated with drupal.

However my custom data fields do not work so well now I have introduced a different theme. The input boxes/buttons are not in line with the labels.

I understand that the drupal theme and the civicrm themes are two separate things. What civicrm files would i need to amend to amend the formatting of the custom data input form. I am not a programmer - I am an amender of css, html and php files only!

Thanks Caroline

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: theming of custom data input form on a user profile
November 30, 2009, 12:31:28 pm
> I understand that the drupal theme and the civicrm themes are two separate things.

Not entirely. In a default Drupal / CiviCRM site, the same Drupal theme is used for CiviCRM pages. The HTML generated by CiviCRM comes from templates in CiviCRM, but the CSS of your Drupal theme is applied.

So the simplest way would be to attempt to adjust/add CSS to your Drupal theme to create the look you want. You should be able to do what you need with CSS.

If necessary, you can also customize the CiviCRM templates, but that can (and will eventually) cause problems (or at least extra work) when upgrading.

HTH
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

carolineb

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 2
Re: theming of custom data input form on a user profile
November 30, 2009, 02:08:38 pm
Ah. OK. I'm going to frighten you with what I don't know! ... When I want to change part of a theme I look at the source file for the page I'm viewing, find the style tag and then go to the style sheet for my chosen theme and amend it.

So when I wanted to style the events html output from civicrm to match my themed drupal page I went to the civicrm css sheet and amended the colour scheme there.

I think you're saying that's not such a good way to do it.

Does my custom theme in drupal have the highest priority out of all of the style sheets called?
How can I find the tags I need to alter? I can see a div id="customData" but not much else in the sourec page but not much else.

Thank you, Caroline

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: theming of custom data input form on a user profile
November 30, 2009, 06:56:35 pm
I think Hershel's approach is probably best if you can get it to work (i.e. adding style directives to your theme's CSS file to modify styles for element in the CiviCRM portion of your pages that need "fixing"). All CiviCRM elements (except stuff in Drupal blocks) are contained in a big <div id="crm-container"> - which can help you address specific page elements. In some cases, you may need to use the "cascading" feature of CSS to make sure you're style is getting applied to the right element. For example:

#crm-container div#customData td.label {
  (your style stuff here)
}

If you haven't started using Firebug (Firefox plugin) to help u inspect and experiment w/ css  on your pages - I'd highly recommend you invest some time checking it out.
Protect your investment in CiviCRM by  becoming a Member!

carolineb

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 2
Re: theming of custom data input form on a user profile
November 30, 2009, 11:05:53 pm
Thank you that is a really helpful starting point tip and I will check out the plugin.
Thanks a lot!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: theming of custom data input form on a user profile
December 01, 2009, 12:30:32 am
Yes, Firebug is a must, without question.

To make CSS rules more specific, sometimes you can just add a body selector. So just in case what Dave wrote doesn't work in some specific case, then try:

body #crm-container div#customData td.label {

Good luck and let us know if there are any problems.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • theming of custom data input form on a user profile

This forum was archived on 2017-11-26.