word-wrap:break-word not working in IE8

前端 未结 5 862
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 03:26

Can anyone please tell me why word-wrap: break-word will not work in IE8?

I have this working in other browsers but IE8 refuses to listen despite readin

相关标签:
5条回答
  • 2020-11-30 04:07

    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;
    
    0 讨论(0)
  • 2020-11-30 04:15

    You can use

    -ms-word-break: break-all;
    
    0 讨论(0)
  • 2020-11-30 04:16

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

    0 讨论(0)
  • 2020-11-30 04:21

    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.)

    0 讨论(0)
  • 2020-11-30 04:26

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

    0 讨论(0)
提交回复
热议问题