I have a Contribution Page that acts as a member sign-up page without contributions. I'm trying to find the HTMl code so that I can change the CSS to look appeal to my companies theme on the webpage. Does anyone know where I would be able to find this?
2 Answers
A typical way to change the css is to make an extension, and then in your extension you add some css overrides. For a contribution page you can do that using https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm.
Otherwise if you edit the core files it makes it difficult to upgrade. By using the extension you don't have to touch the core files.
There isn't a single file with all the HTML code you are looking for. It is generated from various template files. If you want to make CSS adjustments then use your browser's developer tools to look at the generated HTML.
Putting your CSS changes in an extension as @demerit describes is the best practice option. For small tweaks you can also use the custom CSS option: go to Administer > System Settings > Resource URLs
. In the Custom CSS URL
enter something like [civicrm.files]/css/extra.css
, create that file and put your changes in there.