word-wrap:break-word not working in IE8

回眸只為那壹抹淺笑 提交于 2019-11-27 03:47:32

If I recall correctly, word-wrap: break-word; is indeed supported in Internet Explorer 8, but the styled element must have layout.

I found that to apply word-wrap to a td (table cell) I needed to style the table element with table-layout: fixed. (IE8 standards mode.)

Try this word-break: break-all; , for IE8 and IE9 it is working :)

You can use

-ms-word-break: break-all;

After looking at this example code from Microsoft:
https://msdn.microsoft.com/en-us/library/ms531186%28VS.85%29.aspx

I managed to fix my issues with IE-8 with the following addition to the document and header:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

...and then use this (official) CSS directive:

word-wrap: break-word;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!