• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. Ruby > ruby-align Property

22.3. ruby-align Property

The ruby-align property is used to set the horizontal positioning of ruby text relative to the ruby base, and it comes with seven separate values: auto, left, center, right, distribute-letter, distribute-space and line-edge.

With the auto value the browser determines the best arrangement, and the left, center and right alignment values are self-explanatory. The distribute-letter value is used when the width of the ruby text is less than that of the ruby base, and each letter (or character) is spaced out evenly across the width of the ruby text box — essentially it “justifies” the characters evenly across the width of the ruby text box. Similarly, distribute-space is also used when the ruby text is smaller than that of the ruby base, but instead of justifying it, it adds some spacing to either side equal to half the kerning value of the ruby text. Its effects are similar to center, though extra spacing is added between the characters as well as at the “margins.” line-edge appears to align the ruby text to the line edge of the ruby text bounding box, allowing more “room” for the ruby text to appear within, but this does not seem to be case in practice at the moment. The code in Listing 22.5 when displayed in Internet Explorer 5.0 shows the effect of each property.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint