CHM template has HTML and CSS parts. Also you can append any number of additional files (images, scripts, etc.). Alter HTML and CSS if you wish. Helpinator has several built-in templates for CHM and PDF that you can use in your projects.
PDF templates are just RTF files with 5 pages: cover page, TOC template, page template, index and glossary templates.
HTML Template Builder allows you to visually design topic template for CHM and WebHelp.