Skip to main content
Participant
October 25, 2020
Answered

Masterpage background gradient missing on .chm output

  • October 25, 2020
  • 1 reply
  • 305 views

I want to have a header with a linear gradient background with some text on the left and an image on the right. All of this works OK if applied on each topic individually.

At some point I decided to use masterpages to store the header, since it should show up on each topic/page.

It turned out that the gradient background disappears on Microsoft HTML Help (.chm) output if it's sourced from the masterpage. Responsive HTML5 output doesn't have that problem. Also when I replace gradient with solid color the background is again visible on .chm.

Is there any trick that could fix this? Has anyone had a similar problem?

    This topic has been closed for replies.
    Correct answer Amebr

    CHM uses something like Internet Explorer 7, I believe, so any CSS needs to be supported by that browser. (chm hasn't been updated by MS since about 2006...)

     

    You can check broswer support here: https://caniuse.com/

     

    For linear-gradient, the site says that IE7 has a proprietary filter for gradients, which you could try. No guarantees though.

     

    https://caniuse.com/?search=linear-gradient

    1 reply

    AmebrCommunity ExpertCorrect answer
    Community Expert
    October 26, 2020

    CHM uses something like Internet Explorer 7, I believe, so any CSS needs to be supported by that browser. (chm hasn't been updated by MS since about 2006...)

     

    You can check broswer support here: https://caniuse.com/

     

    For linear-gradient, the site says that IE7 has a proprietary filter for gradients, which you could try. No guarantees though.

     

    https://caniuse.com/?search=linear-gradient

    PickNickAuthor
    Participant
    October 26, 2020

    Thanks Amebr,

    indeed it worked when I added this on the masterpage:

    -ms-filter: progid:DXImageTransform.Microsoft.Gradient()

    But that also let me realize that playing with ancient technologies like .chm is asking for trouble;)