Skip to main content
Participant
October 31, 2020
Question

Microsoft HTML Help (chm) output missing default.css

  • October 31, 2020
  • 2 replies
  • 238 views

I have a problem with the default.css stylesheet not being applied to .chm output.

Everything works OK in Author/Contents (also in Preview). All styles are recognized and applied.

I also have a Master Page with its own stylesheet (book.css). This also works fine.

When I look into the Source, the reference to default.css is there.

The problem is with the generated .chm file. Styles are not applied anywhere, at least not those from default.css. Master Page is still working and displaying its own styles (book.css).

When I check the individual .htm files from the unzipped .chm the references to default.css are gone and the only stylesheet references are to _rhdefault.css and book.css.

I don't see any errors in Output Generation Log. I checked default.css for errors, but couldn't find any.

    This topic has been closed for replies.

    2 replies

    Community Expert
    November 2, 2020

    To expand on what Peter says, I believe the master page stylesheet will override any stylesheet applied to the individual topics. If you want multiple stylesheets, make sure all are applied to the master page.

    PickNickAuthor
    Participant
    November 4, 2020

    Thanks Peter and Amebr,

    I'm afraid it was simply a RH glitch. I copied and pasted all code to a blank project and it works fine again (.chm generates with all style sheets).

    I was experimenting with custom html, css and js and sometimes RH gets confused (me too;)

    Peter Grainge
    Community Expert
    Community Expert
    October 31, 2020

    I suspect you only have book.css applied. Apply default.css as well. Make that the first CSS with book.css below and I think it will then work.

     

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.