Set the initial height of the textarea according to its content

Asked

Viewed 48 times

1

I use a reactive angular form that when saving leaves all fields disabled. It turns out that textarea creates a scroll and makes it difficult to read for those just viewing.

I’ve tried the following with css:

textarea:disabled {
 height: 100%;
 font-size: 13px;
 text-align: justify;
 resize: none;
}

inserir a descrição da imagem aqui

I would like it to expand according to its content, which behaves like a DIV with its proper paddings.

  • The question has been edited, please consider

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.