ruby-align Attribute | rubyAlign Property

MS Office DHTML, HTML & CSS

ruby-align Attribute | rubyAlign Property


Sets or retrieves the position of the ruby text specified by the RT object.

Syntax

HTML{ ruby-align: sRubyAlign }
Scriptingobject.style.rubyAlign [ = sRubyAlign ]

Possible Values

sRubyAlign String that specifies one of the following values:
autoBrowser determines how the ruby text is aligned. The recommended behavior for an ideographic (East Asian Character) ruby is to be aligned in the distribute-space mode. The recommended behavior for a Latin character ruby is to be aligned in the center mode.
leftRuby text is left-aligned with the base.
centerRuby text is centered within the width of the base. If the length of the base is smaller than the length of the ruby text, the base is centered within the width of the ruby text.
rightRuby text is right-aligned with the base.
distribute-letterRuby text is evenly distributed across the width of the base if the width of the ruby text is smaller than the width of the base. If the width of the ruby text is at least the width of the base, the ruby text is center-aligned.
distribute-spaceRuby text is evenly distributed across the width of the base if the width of the ruby text is smaller than the width of the base. White space precedes the first and follows the last character in the ruby text, equal to half the kerning of the ruby text. If the width of the ruby text is at least the width of the base, the ruby text is centered.
line-edgeRuby text is centered if it is not adjacent to a line edge. If it is adjacent to a line edge, the side of the ruby lines up with the side of the base text.

The property is read/write with a default value of auto; the proposed cascading style sheets (CSS) extension attribute is not inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic propertiesInternet Link.

Remarks

The rubyAlign property specifies the alignment of the ruby text defined by the RT object, and is set on the RUBY object.

Example

This example uses the ruby-align attribute and the rubyAlign property to set the alignment of the ruby text. It uses an inline style sheet to set the ruby-align attribute to right.

Sample Code

<RUBY ID=oRuby STYLE = "ruby-align: right">
Ruby base.
<RT>Ruby text.
</RUBY>
<INPUT
TYPE=button VALUE="Center"
onclick="oRuby.style.rubyAlign='center';"
>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
RUBY

See Also

rubyPosition, rubyOverhang

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.