Share this Page URL
Help

Chapter 10. Text Properties > text-overflow-mode Property - Pg. 158

Text Properties 158 This code snippet differs from how the <pre> tag would itself work in that it is only applied to embedded characters -- any paragraph that does not contain these characters will be displayed normally. text-overflow-mode Property The text-overflow-mode property is part of a small sub-family of properties (which also includes text-overflow-ellipsis and text-overflow) that control what happens when text over- flows its boundary at the end of a line, and the overflow property prevents the text from simply flowing to a new line. This property allows you to present "hint" characters, like an ellipsis ("..."), suggesting to the viewer that more text is to follow. The text-overflow-mode property has five properties: clip, ellipsis, and ellipsis- word, as well as initial and inherit. The clip value simply snips off the end of the text without leaving any "hint" characters behind. When ellipsis is used, an ellipsis is inserted at the end of the line where the text overflow occurs. The ellipsis-word value works the same way, but instead of inserting an ellipsis at the end of the line, it replaces the final word that would have overflowed the line -- so instead of the ellipsis appearing right up against the boundary of the containing box, it simply replaces what would have been the word prior to the normal ellipsis ap- pearing. The symbol used to indicate the "hint" (which need not be an ellipsis) is controlled by the text-overflow-ellipsis property. The initial value is equivalent to the default value, which in this case is clip, and the inherit value takes on any parent value that may be present. text-overflow-ellipsis Property