I have this almost good piece of code. Almost because IE 11 breaks it:
.textarea {
text-align: left;
background: white;
border: 1px solid grey;
border-style: inset;
height: 150px;
overflow-y: auto;
word-wrap: break-word;
width: 400px;
}
<div class='textarea' contenteditable='true' id='sec1'>blabla</div>
Why does the text (first line) move down after I hit return? I want either the text to appear at first where it will drop to, or just stay there. This will happen even if the 'first line' is entered manually, with no initial content.
` element. The reason why it drops a little is because of margins.
– dokgu Jan 04 '17 at 19:12