XML technologies / CSS / Advanced websites with CSS / CSS property reference / ruby-align

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

Ruby text is used in Japan and China to display pronunciation aids or other explanatory information in small type above the main text. It is part of XHTML 1.1 and is described in detail in the W3C’s “Ruby Annotation Recommendation”.

The property ruby-align specifies how ruby text is aligned.

Inherited: no

See also: ruby-overhang, ruby-position

Values

The property is declared with the following constants:

  • auto

  • center

  • distribute-letter

  • distribute-space

  • left

  • line-edge

  • right

The exact meanings of these constants are explained in detail on the CSS3 Ruby module draft page.

Default value: auto

Compatibility

CSS version: not yet supported by any CSS specification

Works only in Internet Explorer for Windows from version 5. Apply the property to the ruby element containing the relevant ruby text (rt).

Corresponding functionality is planned for CSS3. The drafts indicate that the final property will have the name described here.

Example

The following rule centres the ruby text above the main text:

ruby {
 ruby-align: center;
}

  

 

 

 

back to top