Joshua Joshua - 1 year ago 109
CSS Question

Stop word-wrap dividing words

body { word-wrap: break-word;}

I've been using that code (above) to fit the text in the
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

Answer Source

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

update - rendered data in Firefox alt text

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download