1

I added overflow-wrap: break-word to my css file to support long string.

Does anyone know how to enhance browser compatibility?

haeminish
  • 988
  • 5
  • 15
  • 29

1 Answers1

1

The older name which you can use for backwards compatibility is word-wrap. Be sure to put the older property first, like so:

word-wrap: break-word;
overflow-wrap: break-word;
JakeParis
  • 11,056
  • 3
  • 42
  • 65
  • So putting word-wrap before overflow-wrap will take care of backwards compatibility while the other is for newer browsers? – haeminish Feb 22 '17 at 03:18
  • It should, yes. Any browser that recognizes both should have the same behavior for both. Any browser that only uses the older one will just ignore the newer one. – JakeParis Feb 22 '17 at 03:20
  • in the first link `http://caniuse.com/#search=overflow-w` seems like IE only partially support word-wrap. In fact, word-wrap and overflow-wrap are supported exactly the same. – haeminish Feb 22 '17 at 03:29
  • Just to clarify, firefox 48 doesn't recognize `overflow-wrap`. I guess the yellow ones are for `word-wrap` – pol Feb 22 '17 at 03:38