You are here: Templates and Cascading Style Sheets > Using Cascading Style Sheets > Source Document Style Sheets

Source Document Style Sheets

The source style sheet is specified in the Project.HTMLDefaultCSS property. This default style sheet is attached to every source HTML document when it is added to the project.

Note: There is one exception. If the Add default style sheet to the document check box is unchecked in the Adding HTML Documents or Adding New HTML document dialog box when adding an existing or new document to the project, the default style sheet is not attached to the source document.

Source HTML documents can have other style sheets attached to them as well, in addition to the Doc-To-Help source style sheet, if you want to use other styles besides the ones provided with Doc-To-Help. The main purpose of attaching the Doc-To-Help style sheet is to make Doc-To-Help Markup Language (D2HML) styles available in the document.

When building a help target, Doc-To-Help detaches the source document style sheet from the HTML documents and attaches the help target style sheet, just as it detaches the source templates from Word documents and attaches the target template. For more information on Word templates, see Templates and Cascading Style Sheets.

When you create a new project using Mixed or HTML source documents, there are two options for the Doc-To-Help style sheets you can use: Full set of styles and Minimal set of styles.

The Full set of styles option attaches the C1H_Source_full.css style sheet to your HTML source documents, which provides a rich set of styles designed for consistency with Word styles defined in Doc-To-Help templates.

The Minimal set of styles option attaches the C1H_Source_short.css style sheet to your HTML source documents, which provides only the D2HML styles in the source style sheet.

Note: If you are using your own style sheets, select Minimal set of styles when creating a new Doc-To-Help project. Then Doc-To-Help will add a minimal style sheet to your document, containing only the necessary D2HML styles for defining help authoring behaviors and nothing else. You can freely use your own style sheets in your source documents to control their appearance, Doc-To-Help will preserve them in the target and will not interfere with them.

If you created an HTML source document outside of the Doc-To-Help project without using the New Project wizard, you can apply the style sheets by including the following HTML code within the <HEAD> tags of your source document:

      <LINK title=_d2hDefaultCSS href="..\DefaultCSSFiles\C1H_Source_full.css" rel=stylesheet>

This attaches the C1H_Source_full.css style sheet to the document.

      <LINK title=_d2hDefaultCSS href="..\DefaultCSSFiles\ C1H_Source_short.css " rel=stylesheet>

This attaches the C1H_Source_short.css style sheet to the document.

More:

Setting the Default CSS

Adding a New Style Sheet to the Source Document