Search code examples
helpndoc

Adding custom CSS content to CHM projects in HelpnDoc


If you look at this page you will see that I have a note:

Note

This note style was created using HelpnDoc:

Style

As you can see, I decided to introduce a small image, which I left aligned. I then had to add the following custom css .rvps18 {padding-bottom: 20px;} so that the note would encompass the bottom of the icon:

Custom CSS

It all works fine. The problem I am having now is with my CHM build of the project. In my CHM file the same note looks like this:

CHM Note

It hasn't applied the same custom CSS that I added. That is logical. So I went into the CHM settings this time. But look:

CHM Settings

It does not seem to offer the same custom CSS options. I thought I would try and make my own template by copying the standard one and making changes that way. But I encountered two problems.

Issue 1

When I view the source in the CHM file for my page it has:

<link type="text/css" rel="stylesheet" media="all" href="css/reset.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/base.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/hnd.css" />

This latter hnd.css file is nowhere to be seen. Where is it being included from as it is not in the template folder?

Issue 2

I create a new CSS file and add in the same custom CSS but I can't work out how to include this CSS file in the compilation.


In short, I am trying to add the same custom CSS code to the CHM project so that the note will look the same in the CHM file as it does in the HTML file and I can't work out how to do it.


Solution

  • At the moment I have decided to change the alignment setting for the icon:

    Alignment

    It does adjust the word flow so it is not 100% what I wanted. But atleast the icon is fitting within the paragraph without any need for extra padding. So no custom CSS needed for eith CHM or HTML project.

    So I tweaked the line spacing to 1.2 and increased the font size to 14. The results in CHM:

    Results in CHM

    So I will stick with this methodology until someone is in a position to provide another answer.