How can I preserve changes to civicrm.css when I update civicrm?
For example the combo box for Event Fee(s), Registration Fee is too narrow - the amounts are cutoff on the right. I want to preserve my width setting of 20em.
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.Sign up to join this community
If you use a custom CSS style sheet, you avoid the scenario you mention of losing modifications to your CSS upon upgrade. From the top menu, go to
Administer > System Settings > Resource URLS and use the Custom CSS URL field. Its help text reads:
You can modify the look and feel of CiviCRM by adding your own stylesheet. For small to medium sized modifications, use your css file to override some of the styles in civicrm.css. Or if you need to make drastic changes, you can choose to disable civicrm.css completely.
You can put the file anywhere you'd like (so you would put it outside of the file structure that will get replaced when you upgrade CiviCRM; just specify its location in the field). That custom CSS file gets loaded after
civicrm.css so as long as you've selected the proper components with your IDs, classes, etc. your custom CSS will take precedence over Civi's.