Javascript Reference
Categories: STYLE

javascript STYLE wordWrap

@March 15, 2008, 1:22 a.m.
wordWrapFirefox/Netscape/NN n/a IE 5.5(Win) Chrome/Safari/DOM n/a  

Read/Write  

Specifies the word-wrapping style for block-level, specifically-sized inline, or positioned elements. If a single word (i.e., without any whitespace) extends beyond the width of the element containing box, the normal behavior is to extend the content beyond the normal box width, without breaking. But you can force the long word to break at whatever character position occurs at the edge of the box.

 
Example
 
document.getElementById("myDIV").style.wordWrap = "break-word";
 
Value

One of the constant values (as a string): break-word | normal.

 
Default

normal


Powered by Linode.