Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

10 Generating OmniHelp > 10.4 Using CSS with OmniHelp > 10.4.2 Understanding how CSS works in OmniHelp topics


10.4.2 Understanding how CSS works in OmniHelp topics

Each OmniHelp topic file includes in the <head> element a <script> tag that invokes script file ohmain.js. The ohmain.js script calls mainCSS() in parent-frameset script file ohframe.js, which in turn writes a CSS <link> into the topic file.

The CSS <link> in the topic file specifies the value of mainCssName, which is taken from project settings in myproj_ohx.js (see Table 10-2), which are based on [OmniHelpOptions] settings in the configuration file (see §10.4.1 Specifying CSS for topics in OmniHelp). Because the ohframe.js script detects the browser before writing the <link>, the value of mainCssName might depend on what you specified in [OmniHelpOptions] for IECssName, N6CssName, or N4CssName.

As a result, you can see the effects of CSS in topic text only if both of the following are true:

the HTML topic file you are viewing was generated by Mif2Go for OmniHelp (or you added the proper <script> tag to the topic file)

you are viewing the topic in the OmniHelp frameset, not by itself in a browser.

Otherwise, the CSS <link> would not be set.



10 Generating OmniHelp > 10.4 Using CSS with OmniHelp > 10.4.2 Understanding how CSS works in OmniHelp topics