Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

22 Setting up CSS for HTML > 22.8 Customizing CSS properties > 22.8.3 Specifying CSS size values and units of measurement


22.8.3 Specifying CSS size values and units of measurement

By default, measurements for properties such as font size and line height are expressed in pt units in Mif2Go-generated CSS entries. You can direct Mif2Go to use other units instead. For example, if you are generating HTML Help and you want to enable the Font button on the toolbar, font sizes are best expressed in em units. Relative units (em, ex, and %) are based on whatever absolute unit (pt, pc, in, cm, mm, or px) is used for the font-size property of the <body> tag entry; see §22.8.2 Specifying CSS <body> tag properties.

You can specify how many decimal places Mif2Go should use for CSS property values; the default is two decimal places. Trailing zeros in property values are eliminated. For example, if a value is computed to be 1.00em, in the CSS file the value appears as 1em. Fractional values are rounded rather than truncated.

To specify units of measurement for font size and line height in CSS entries:

[CSS]

; CssFontUnits = units for font size and line height, default 0:

; 0=pt, 1=pc, 2=in, 3=cm, 4=mm, 5=em, 6=ex (0.5em), 7=px (pixels), 8=%

CssFontUnits=0

; CssFontUnitDec = count of digits to right of decimal in CSS font

; values: 0, 1, or 2, default 2. Trailing zeros are trimmed.

CssFontUnitDec=0

To specify units of measurement for paragraph spacing, indentation, and margins:

[CSS]

; CssIndentUnits = units for para space and indents, default 0:

; 0=pt, 1=pc, 2=in, 3=cm, 4=mm, 5=em, 6=ex (0.5em), 7=px (pixels), 8=%

CssIndentUnits=0

; CssIndentUnitDec = count of digits to right of decimal in CSS indent

; values: 0, 1, or 2, default 2. Trailing zeros are trimmed.

CssIndentUnitDec=0

; CssIndentBaseSize = value used for computing percents for margin

; settings (para space above and below, and indents) in .css file

CssIndentBaseSize=6

; CssIndentBaseUnit = units for CssIndentBaseSize, default 2 (in)

; 0=pt, 1=pc, 2=in, 3=cm, 4=mm, 7=px (pixels).

CssIndentBaseUnit=2

The base unit of measurement for computing margin settings should be an absolute unit, not a relative unit.

See also:

§22.8.2 Specifying CSS <body> tag properties

§22.8.4 Overriding styles in Mif2Go-generated CSS files



22 Setting up CSS for HTML > 22.8 Customizing CSS properties > 22.8.3 Specifying CSS size values and units of measurement