HTML CSS examples for CSS Property:word-wrap
Wrap to break word
<html> <head> <style> #foo {<!--from ww w. j a v a2 s. c o m--> width:100px; background:gold; word-wrap:break-word; margin-bottom:51px; } #bar { width:100px; background:gold; word-wrap:normal; } </style> </head> <body> <div id="foo"> This text is too long to fit in the div. but it wraps to new lines anyway! </div> <div id="bar"> This text is too long to fit in the div. but it DOESN'T wrap to new line! :( </div> </body> </html>