AlfaTeK
AlfaTeK

Reputation: 7775

Weird text wrap on textareas with IE11

On IE11 / win7 64 I'm noticing a very weird pattern relating to how words wrap on a textarea.

Example:

example

http://fiddle.jshell.net/fy2aoz28/1/

With that text on the textarea, the second line is almost empty but it has space to at least have to "to :event_name" string.

On chrome that looks like this:

chrome example

So, what's going on here and is there any way to force all browsers on the same behavior?

Upvotes: 1

Views: 3378

Answers (1)

Chris Yongchu
Chris Yongchu

Reputation: 789

Add the white-space property. It is used to describe how whitespace inside an element is handled.

textarea{
    width: 300px;
    height: 200px;
    white-space: pre;
}

Should look the same in Chrome and IE now. Here's a fiddle for you to review. http://fiddle.jshell.net/fy2aoz28/2/

Upvotes: 2

Related Questions