#### 31.4.2 Designating and locating a CSS file

To specify CSS file name and location in the configuration file:

[CSS]
UseCSS=Yes
; CssFileName = name of style sheet to reference in link when
; WriteCssLink=Yes and CssBrowserDetect is absent.
CssFileName=MyStyles.css
; CssPath = directory in which .css (or .xsl) files are to be placed
CssPath=./css

CssFileName designates the CSS file to be referenced when WriteCssLink=Yes. Do not include a path; the value of CssFileName should be just a file name with extension. The default value is local.css, and the default location is the directory designated by CssPath.

CssPath designates the directory to be referenced in CSS links when WriteCssLink=Yes. If you use backslashes in the path name, DITA2Go changes them to forward slashes before writing the path to your HTML output files. The default value of CssPath is the output directory; see §44.8 Placing CSS or XSL files for assembly. You can have DITA2Go copy CSS files to the CssPath directory from another location at run time.

Path to CSS file should be relative

If you specify a value for CssPath, the path should be relative to the directory containing your HTML files. If you specify an absolute path, the CSS file is likely to be accessible only on your own machine.

Default CSS file name and location

If all of the following are true, DITA2Go creates a CSS file named local.css and places it in the project directory:

- You have indicated that you want DITA2Go to use CSS (that is, UseCSS=Yes).
- The value of WriteCssStylesheet is either Once or Always.
- The configuration file has no entries at all for either CssFileName or CssPath.
- The project directory does not already contain a file named local.css.

Previous Topic: 31.4.1 Specifying CSS options in a DITA2Go configuration file

Next Topic: 31.4.3 Directing DITA2Go to generate a CSS file

Parent Topic: 31.4 Specifying CSS file and link options

Sibling Topics:

31.4.1 Specifying CSS options in a DITA2Go configuration file

31.4.3 Directing DITA2Go to generate a CSS file

31.4.4 Understanding effects of the older Stylesheet setting

Table of Contents • Index