by http://webgeektutorials.blogspot.com

Thursday, April 7, 2011

CSS: Word Wrap

It is possible to force long continuous text to wrap in a new line by specifying break-word with the word-wrap  property. Word-wrap is supported in IE 5.5+, Firefox 3.5+, and WebKit browsers.

Word-Wrap has basically two values normal or break-word value with the word-wrap property.
  • Normal means the text will extend the boundaries of the box. 
  • Break-word means the text will wrap to next line.
In your style-sheet :
.wrapwords { 
   word-wrap: break-word; 
}

Note : Please remember that if parent div has a property called white-spacenowrapthen this doesnt work.

No comments:

Post a Comment