Alex Rivera | Logout

Stop word-wrap dividing words

Asked 2010-09-23T06:11:34.703
109
body { word-wrap: break-word;}

I've been using that code (above) to fit the text in the body into it's container. However what I don't like about it, is that it breaks up words.

Is there another way where it will not break up words and only line break after or before a word?

EDIT: This is for use within a UIWebView.

Edit
Report

1 Answer

115

use white-space: nowrap;. If you have set width on the element on which you are setting this it should work.

update - rendered data in Firefox alt text

answered 2010-09-23T08:08:11.297

Your Answer