Export (0) Print
Expand All
top
Expand Minimize
This topic has not yet been rated - Rate this topic

wordWrap property

Sets or retrieves whether to break words when the content exceeds the boundaries of its container.

CSS Text Level 3, Section 7.2

Syntax

HRESULT value = object.put_wordWrap( v);HRESULT value = object.get_wordWrap(* p);

Property values

Type: BSTR

normal (normal)

Default. Content exceeds the boundaries of its container.

break-word (break-word)

Content wraps to next line, and a word-break occurs when necessary.

String format

normal | break-word

CSS information

Applies ToAll elements
Mediavisual
Inherited1
Initial Value

Standards information

Remarks

Windows Internet Explorer 8. The IHTMLCSSStyleDeclaration::wordWrap attribute is an extension to CSS, and can be used as a synonym for word-wrap in IE8 Standards mode.

Use this property to enable the browser to break up otherwise unbreakable strings.

This differs from the IHTMLCSSStyleDeclaration::whiteSpace property, which turns wrapping of the text on and off. The IHTMLCSSStyleDeclaration::wordWrap property addresses only whether wrapping is permitted to occur at a place in the word that is not otherwise allowed by the language rules in effect.

The standards referenced below define this property's behavior as being dependent on the setting of the "text-wrap" property. However, wordWrap settings are always effective in Windows Internet Explorer because Internet Explorer does not support the "text-wrap" property.

This property is read-only for the IHTMLCurrentStyle2 interface.

This property is read-only for the currentStyle object.

This property applies to elements that have layout. An element has layout when it is absolutely positioned, is a block element, or is an inline element with a specified height or width.

Examples

The word "blonde" is not wrappable under typical English rules. But, when wordWrap is set to break-word, the word "blonde" can be split onto two lines in any way the browser chooses: such as "b" and "londe", or "blo" and "nde".

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference
IHTMLCSSStyleDeclaration::lineBreak
IHTMLCSSStyleDeclaration::wordBreak
IHTMLCSSStyleDeclaration::whiteSpace

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.