Jump to content

How to let textarea appear big enough for whole content?


pstein

Recommended Posts

Assume in multiple textareas appear some source code text whose number of lines varies from textarea to textarea.

 

Is there a CSS style which I can attach to such a textarea and which tells the browser:

"make textarea automatically big (height) enough to show ALL lines in textarea + 1 blank line at the end but NOT bigger/heigher/more rows than necessary?

 

If this is not possible with CSS then at least is there a javascript command which let me calculate the number (and assign the "row" parameter to the textarea?

 

If lines are longer then current textarea width/columns then these lines should be wrapped.

 

Peter

Edited by pstein
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...