Can we integrate CSS file into a CHM file ? RRS feed

  • Question

  • Hi,
    I would like to add html files AND CSS files into one Chm file.
    Is it possible ?
    Friday, September 4, 2009 5:20 PM

All replies

  • Do you have all the project and source files of the resulting CHM file?

    If YES - you can. Otherwise you have to decompile and recreate the project files.
    You know, it's recommended creating clean HTML files by using CSS.

    Some additional information for you adding your CSS file to the [FILES] section like described below.

    The help compiler tries to pull into the .chm all local files that are *directly* referenced in the HTML files, whether they be other HTML files, graphics, cascading style sheets, etc. Make sure your script file and CSS is compiled into your CHM too.

    To make extra certain that all graphics (and Cascading Style Sheets like *.css) are compiled into the .chm, you can list them in the [FILES] section of your project (.hhp) file. With HTML Help Workshop, the procedure is as follows:

    1) Click the Add/Remove Topic Files button on the Project tab.
    2) Click Add.
    3) In the File Name field, type *.gif (or *.jpg).
    4) Click Open, and then select the graphics files to add.

    If you want, you can use wildcards in the [FILES] section to specify every file in a given directory. For example:


    Of course, you'd have to edit the project file in a text editor such as Notepad to do this and compile again. Note that all files must be on the project file "folder level" or in subfolder structure level.

    Ulrich Kulle - Microsoft MVP - Help - http://www.help-info.de
    • Proposed as answer by James Gopinath Thursday, November 8, 2012 6:52 AM
    Tuesday, September 8, 2009 10:32 AM