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

8. Text > Text Alignment

Text Alignment

The <text> element lets you specify the starting point, but you don’t know, a priori, its ending point. This would make it difficult to center or right-align text, were it not for the text-anchor property. You set it to a value of start, middle, or end. For fonts that are drawn left-to-right, these are equivalent to left, center, and right alignment. For fonts that are drawn in other directions (see Section 8.7) these have a different effect. Example 8-3 shows three text strings, all starting at an x-location of 100, but with differing values of text-anchor. A guide line is drawn to show the effect more clearly in the result, Figure 8-5.

Example 8-3. Use of text-anchor

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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