Web hosting service - 471Chapter 19 .Body Text Objects About this object

471Chapter 19 .Body Text Objects About this object The IE5+ TextRectangle object (not implemented in IE5/Mac) exposes to scripts a concept that is described in the HTML 4.0 specification, whereby an ele ment s rendered text occupies a rectangular space on the page just large enough to contain the text. For a single word, the rectangle is as tall as the line height for the font used to render the word and no wider than the space occupied by the text. But for a sequence of words that wraps to multiple lines, the rectangle is as tall as the line height times the number of lines and as wide as the distance between the left- most and rightmost character edges, even if it means that the rectangle encloses some other text that is not part of the element. If you extract the TextRectangleobject for an element by way of, for example, the getBoundingClientRect()method, be aware that the object is but a snap shot of the rectangle when the method was invoked. Resizing the page may very well alter dimensions of the actual rectangle enclosing the element s text, but the TextRectangle object copy that you made previously does not change its values to reflect the element s physical changes. After a window resize or modification of body text, any dependent TextRectangleobjects should be recopied from the element. Properties bottom left right top Values: Integers Read-only NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . The screen pixel coordinates of its four edges define every TextRectangle object. These coordinates are relative to the window or frame displaying the page. Therefore, if you intend to align a positioned element with an inline element s TextRectangle, your position assignments must take into account the scrolling of the body. To my eye, the left edge of a TextRectangledoes not always fully encompass the left-most pixels of the rendered text. You may have to fudge a few pixels in the measure when trying to align a real element with the TextRectangle of another element. TextRectangle.bottom
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply