0

I wish the containing element (either a or element) to automatically expand vertically to accommodate text that has reach the end of line. Is there a way to do this with plain HTML elements? If not, can I do this using javascript?

Thanks.

whamsicore
  • 8,320
  • 9
  • 40
  • 50
  • is this taking input from user or you are outputting data from the server? – redDevil Jan 10 '12 at 19:49
  • possible duplicate of [Autosizing textarea using prototype](http://stackoverflow.com/questions/7477/autosizing-textarea-using-prototype) – Ryley Jan 10 '12 at 19:53
  • 1
    Possible duplicate of http://stackoverflow.com/questions/7477/autosizing-textarea-using-prototype – j08691 Jan 10 '12 at 19:53

1 Answers1

2

Sorry, but there is no way to this in plain HTML. With Javascript it's possible though.

Take a look at jQuery plugin: autoResize. Note: this is a plugin for jQuery.

Also, see this thread for more jQuery alternatives.

Community
  • 1
  • 1
Magnus
  • 417
  • 4
  • 18