Alternative for `word-break: break-word`

Jithin Raj  P R picture Jithin Raj P R · Nov 21, 2017 · Viewed 9.3k times · Source

Is there an alternative for word-break: break-word that works in firefox ?

In firefox[Version 57.0]

enter image description here

In Chrome[Version 62.0.3202.94]

enter image description here

Is there a way or an alternative to use break-word attribute in firefox also.? [if it works in older versions it would be much better.]

Sample Code

Answer

Yvonne Aburrow picture Yvonne Aburrow · Nov 21, 2017

The valid values of word-break are as follows:

/* Keyword values */
word-break: normal; 
word-break: break-all; 
word-break: keep-all;

/* Global values */
word-break: inherit;
word-break: initial;
word-break: unset;

The word-break CSS property specifies whether or not the browser should insert line breaks wherever the text would otherwise overflow its content box.

Chrome, Safari and other WebKit/Blink browsers also support the unofficial break-word value which is treated like word-wrap: break-word.

So could you use word-wrap: break-word instead?