Internet Explorer 11 word wrap is not working

后端 未结 7 781
悲&欢浪女
悲&欢浪女 2020-11-29 06:57

It seems that word wrapping no longer works for textarea elements in IE 11. In IE 10 and earlier, FF, Safari, and Chrome word wrapping works as expected.

IE 11 is no

相关标签:
7条回答
  • 2020-11-29 07:28

    In order to ensure that the answer is obvious to people visiting this question in the future: the OP (wesley) answered the question himself in the comments beneath the question:

    The cause of the problem is that Internet Explorer 11 makes textarea elements inherit whatever white-space property is applied to the direct parent.

    The resolution is to apply white-space: pre-wrap to the textarea, as identified by Jean-François Beauchamp.

    0 讨论(0)
  • 2020-11-29 07:31

    add CSS

     {width: 100%} 
    

    this will wrap the text to its tag

    0 讨论(0)
  • 2020-11-29 07:34

    I faced a similar issue for a drop-down on IE (11.431.16299.0)and I fixed by applying both below style

    white-space:pre-wrap;
    word-break:break-all;
    
    0 讨论(0)
  • 2020-11-29 07:44

    I got here for a different problem where word-wrap wasn't working on IE11;

    The {width: 100%} solution did work for me.

    0 讨论(0)
  • 2020-11-29 07:47

    I had a similar issue and solved it by changing the word-wrap styling to word-break styling:

    { word-break: break-all; }
    
    0 讨论(0)
  • 2020-11-29 07:53

    Note that IE11, in compatibility mode, will not wrap lines correctly. To get at it, click Alt, Tools, Internet Options, Security, Local intranet, Sites, Advanced. See what is in that list.

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