Alternative Way to Let CSS word-wrap works in IE

Firefox/Chrome can wrap the text inside spans or divs neatly without expanding them when you set the css property: word-wrap: break-word. However, IE can’t achieve it. IE only wraps words at word separators like spaces or hyphens. If the text does not contain spaces or hyphens, the span or divs expands in width.

We can try word-break:break-all;

The HTML for testing

Leave a Reply

Your email address will not be published. Required fields are marked *