Multi-level lists not respected in CHM output

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.

Multi-level lists not respected in CHM output

Postby Wendy F on Tue Nov 01, 2016 5:09 pm

We use complex selectors in our CSS to style our multi-level lists. Everything looks great in the HTML5 output, but for some reason the CHM does not respect the indents on second-level items (ol or ul). We had a similar problem with our print output, but that was solved by creating a different left margin for the print medium. The HTML5 and CHM targets use the default medium. And the CHM is using the Browser Default Size.

FWTW This is what we have in the CSS, starting with styles for the default medium.


Code: Select all
ul ul,
ol ul
{
   margin-left: -20px;
}

ol ol,
ul ol
{
   list-style-type: lower-alpha;
   margin-left: -20px;
}

@media print
ol ol
   {
      margin-left: 1.5em;
   }

   ol ul
   {
      margin-left: 1.5em;
   }

   ul ol
   {
      margin-left: 1.5em;
   }

   ul ul
   {
      margin-left: 1.5em;
   }


But my real question is,"Why would the CHM output be so different than the HTML5?"

Thanks!
Wendy F
Propeller Head
 
Posts: 29
Joined: Thu Sep 10, 2015 5:24 am

Re: Multi-level lists not respected in CHM output

Postby Dave Lee on Wed Nov 02, 2016 2:28 am

If that's the actual CSS, then you're missing the opening and closing brackets from the print media section.

@media print
{
ol ol
{
margin-left: 1.5em;
}

...

}
Dave Lee
Master Propellus Maximus
 
Posts: 5948
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Multi-level lists not respected in CHM output

Postby Wendy F on Wed Nov 02, 2016 8:30 am

not an actual CSS...just lines that I copied.
Wendy F
Propeller Head
 
Posts: 29
Joined: Thu Sep 10, 2015 5:24 am

Re: Multi-level lists not respected in CHM output

Postby GregStenhouse on Wed Nov 02, 2016 1:13 pm

CHM help uses an older version of IE to render it's output (I think IE7). My guess is the older version doesn't support complex selectors in that way, or perhaps modern browsers add additional indents in their inbuilt stylesheet that CHM help doesn't.

Try using IE's F12 Developer Tools to set the Emulation/Document Mode to IE7 and see if you can replicate the problem in HTML files generated from your web help/css. That may help you tweak your CSS and find a solution that works for both HTML5 and CHM.
GregStenhouse
Sr. Propeller Head
 
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Multi-level lists not respected in CHM output

Postby Dave Lee on Thu Nov 03, 2016 1:02 am

Wendy F wrote:The HTML5 and CHM targets use the default medium.


If they both use the (default) medium, then you print medium is irrelevant.

Also, I just noticed your default margin is -20px.

I'm not sure why you have a negative margin, but it presumably explains why your list looks wrong - I'd imagine that the first level of the list is probably disappearing off the left of the window.

I think you need to sort out your list margin and padding, without using negative values.
Dave Lee
Master Propellus Maximus
 
Posts: 5948
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Microsoft CHM Help

Who is online

Users browsing this forum: No registered users and 2 guests