Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using an external external style sheet

17 views
Skip to first unread message

cs524

unread,
Mar 25, 2013, 11:59:34 AM3/25/13
to
Hi,

Apologies if this is answered elsewhere. I promise I've looked.

I'm trying to find a way to distribute a CHM whose html pages use a CSS file that is located in the same folder as the CHM.

I can get an HREF to an internet-accessible css file to work:
<LINK REL=StyleSheet HREF="http://www.mydomain.com/styles/stylesheet.css" TYPE="text/css">

I can get an HREF to a fully-pathed local file to work:
<LINK REL=StyleSheet HREF="file:///c:/folder/help/stylesheet.css" TYPE="text/css">

However, I cannot hard-code a full path into my HTML files, as I cannot know in advance the final resting place of the CHM.

Is there a way to build the HREF to the CSS file that does not use JavaScript?

Thanks,
Chad



Rainer H. Rauschenberg

unread,
May 15, 2013, 3:22:34 PM5/15/13
to
On 2013-03-25, cs524 <chads...@gmail.com> wrote:

> However, I cannot hard-code a full path into my HTML files, as I
> cannot know in advance the final resting place of the CHM.
>
> Is there a way to build the HREF to the CSS file that does not use
> JavaScript?

<link rel="stylesheet" href="stylesheet.css">

The trick ist that you have to include the css-file into the hhp-file,
since it will not be automatically included in the chm.

0 new messages