|
home / documentation / reference / fontsize
FontSize
- Description:
- The size designation for text that appears in menu items.
- Value:
- String, "", or JavaScript expression that returns a string/"".
- Applies To:
- Menu Items.
- Browser Compatibility:
- FontSize is supported in all browsers, though not all browsers
may recognize all possible CSS values (especially Netscape 4.x).
- Comments:
- FontSize should be applied as a string, which means the
value you supply should always be in quotes. Allowed values for FontSize
are the same as those allowed in the standard CSS font-size property
(see the W3C Specs)
and in fact, the value you supply is transferred as is to the JavaScript
fontSize property for each menu item.
Note that a length indicator, i.e., "pt," "px," "%," etc. must be
included in FontSize, which is why the value itself must be provided
as a string (unlike most other HierMenus numerical indicators). See the examples
below. The ability to specify a length indicator is new to HierMenus version
6 and allows you to specify that your font size be set in pixels, ems, percentages,
or any other legal CSS representation.
- Examples:
// Ok:
FontSize:"10pt",
FontSize:"12px",
FontSize:"", // use style sheet default
FontSize:(HM_NS4&&HM_Mac)?"14px":"10px", // 14px on NS4 Mac; else 10px
// Incorrect:
FontSize:"12", // length indicator required
FontSize:15px, // quotes required
FontSize:"(HM_Mac)?'12px':'10px'", // no quoted expressions here
- Default:
- "10pt"
- See Also:
-
FontStyle,
FontFamily,
FontWeight,
FontColor,
FontColorOver,
FontColorSelected,
Using Classes Mini-Tutorial
|