#### 31.8.1 Specifying CSS <body> tag properties

You can specify a size value and the unit of measurement for the font-size property of the <body> tag in a DITA2Go-generated CSS file. Or, you can direct DITA2Go not to include a <body> tag entry in the CSS file; then you can substitute your own entry, in the project configuration file. Use one or the other method to specify a font size other than the default:

Custom font size and units

Custom <body> tag entry.

Custom font size and units

To specify font size and unit of measurement for the <body> tag:

    [CSS]
    ; CssBodyFontSize = value for body {font-size: }, used as base for all
    ;  em and ex sizes, and for font-size and line-height %, default 10.
    CssBodyFontSize=10
    ; CssBodyFontUnit = units for body {font-size: }, default 0:
    ;  0=pt, 1=pc, 2=in, 3=cm, 4=mm, 7=px (pixels).
    CssBodyFontUnit=0

CssBodyFontSize determines how values of relative measures em, ex , and % are computed for other CSS style properties. For example, 1.5em in a style property equals 1.5 times the value in pt (or in another non-relative unit) of the <body> tag font-size property.

CssBodyFontUnit should be an absolute unit of measurement rather than a relative unit.

Custom <body> tag entry

To prevent DITA2Go from automatically including a style entry for the <body> tag in a DITA2Go-generated CSS file:

    [CSS]
    ; CssBodyFontTag = Yes (default, writes body { font-size:) or No
    CssBodyFontTag=No

To specify the default font size yourself, provide a custom entry in macro section [CSSStartMacro]. For example:

    [CSSStartMacro]
    body { font-size: 11pt; margin: 0 0 0 0 }

See also:

§31.8.2 Specifying CSS size values and units of measurement

§31.8.3 Overriding styles in DITA2Go-generated CSS files

Previous Topic: 31.8 Customizing CSS properties

Next Topic: 31.8.2 Specifying CSS size values and units of measurement

Parent Topic: 31.8 Customizing CSS properties

Sibling Topics:

31.8.2 Specifying CSS size values and units of measurement

31.8.3 Overriding styles in DITA2Go-generated CSS files

31.8.4 Adjusting leading (line spacing) in CSS

31.8.5 Preventing <font> tags from overriding CSS properties

Table of Contents • Index