 |
|
We are providing HierMenus to you at no cost. HierMenus code requires a confirmed membership with internet.com. Please register by clicking here and come back soon to download your free copy of HeirMenus code.
|
|
 |

|
 |
 |
|
home / documentation / reference / textalign
TextAlign
- Description:
- The default alignment (right, left, or center) for the content
of menu items.
- Value:
- String, "", or JavaScript expression that returns a string/"".
- Applies To:
- Menu Items.
- Browser Compatibility:
- TextAlign is supported in all browsers, though not all browsers
may recognize all possible CSS values. Though any legal CSS value may be specified,
for best results we recommend using only left, center, or
right.
- Comments:
- TextAlign should be applied as a string, which means the
value you supply should always be in quotes. Allowed values for TextAlign
are the same as those allowed in the standard CSS text-align property
(see the W3C Specs)
and in fact, the value you supply is transferred as is to the JavaScript
textAlign property for each menu item. Note, however, that we recommend
using only left, right, or center.
HierMenus will override the TextAlign setting in one specific case:
In older Gecko browsers where page rendering is set to dir="rtl". This is a bug
workaround and is described more fully in the release notes for HierMenus
version 5.3, see Bulletin 9. The result of the workaround
is that menu items are always aligned to the right when dir="rtl" pages
are loaded in earlier Gecko browsers (prior to Netscape 7.1 and Mozilla 1.3).
In previous versions of HierMenus, it was often necessary to embed alignment
instructions within the HTML of the menu items themselves (i.e.,
<center>Menu Item 1</center>). With the addition of TextAlign
such additional instructions are unnecessary, and in fact we do not recommend them,
as they can conflict with HierMenus' own internal alignment routines (especially
in Netscape 4.x).
- Examples:
// Ok:
TextAlign:"right",
TextAlign:"center",
TextAlign:"", // use style sheet default
TextAlign:(HM_f_RTLCheck())?"right":"left",
// "right" if page is in dir='rtl' mode,
// "left" otherwise
// Incorrect:
TextAlign:"zigzag", // must be valid CSS value
TextAlign:right, // quotes required
TextAlign:'(HM_f_RTLCheck())?"right":"left"',
// no quoted expressions
- Default:
- ""
- See Also:
- Bulletin 9
|
|