Discussion:
Styles, style sheets, and HTML help.
(too old to reply)
David Webber
2009-01-22 13:17:10 UTC
Permalink
I am trying to get an artistic margin in my help topics with a style sheet
containing:

body.musictopic { background-image: url(image/marginmusictopics.gif);
background-repeat:repeat-y; }

and then

<body class="musictopic">

in the document.

It works fine when viewed in IE7, and in FrontPage2003, but there's no sign
of the background image when viewing the compiled .chm file.

This is the first fairly standard style which compilation into .chm seems to
lose.

Does anyone know anything about this? Am I doing something wrong?

Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
Pete Lees
2009-01-22 13:32:08 UTC
Permalink
Hi, Dave,
Post by David Webber
I am trying to get an artistic margin in my help topics with a style sheet
body.musictopic { background-image: url(image/marginmusictopics.gif);
background-repeat:repeat-y; }
and then
<body class="musictopic">
in the document.
It works fine when viewed in IE7, and in FrontPage2003, but there's no sign
of the background image when viewing the compiled .chm file.
You need to add the graphic to the [FILES] list in your project (.hhp) file.
Here is the HTML Help Workshop procedure:

1) Click the Add/Remove Topic Files button on the Project tab.

2) Click Add.

3) In the File Name field, type *.gif.

4) Click Open, and then select the graphics file to add.

Graphics that are directly referenced in the HTML source files through <img>
elements don't need to be listed in the [FILES] section, as the help compiler
will automatically pull them into the .chm file. But any graphics that are
referenced at one remove -- for example, in a .css or .js file -- must be
listed in this section to ensure that they're compiled into the .chm file.

Pete
David Webber
2009-01-22 16:13:26 UTC
Permalink
Post by Pete Lees
You need to add the graphic to the [FILES] list in your project (.hhp) file.
...
Graphics that are directly referenced in the HTML source files through <img>
elements don't need to be listed in the [FILES] section, as the help compiler
will automatically pull them into the .chm file. But any graphics that are
referenced at one remove -- for example, in a .css or .js file -- must be
listed in this section to ensure that they're compiled into the .chm file.
Magic! Thanks Pete. It makes a lot of sense when one knows the answer
:-)
Post by Pete Lees
...
I use FAR for managing it (but haven't yet downloaded the latest update).
Unfortunately it only wants to add .htm files as far as I can tell.

But the .hhp file is ASCII of course, so NotePad works fine for editing it
:-)

And the result works like a dream!

Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
Loading...