Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabled Scrollable Textarea

Tags:

html

How can I create a scrollable text area which is disabled? By this I mean, I would like the user to be able to scroll to see the contents of the text area but not be able to edit it.

like image 383
Hector Barbossa Avatar asked Oct 22 '10 08:10

Hector Barbossa


2 Answers

I think you need to know the readonly property.

<textarea readonly>blabla<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></textarea>

Try here : link

like image 52
Shikiryu Avatar answered Oct 04 '22 16:10

Shikiryu


Why use a <textarea> if user can't edit it ?

A simple <div> would do the trick with fixed height and overflow:auto;

like image 25
MatTheCat Avatar answered Oct 04 '22 16:10

MatTheCat