i have this text box
Event Data :
How about this:
<p>Event Data:
<textarea id="data" style="width: 757px; height: 170px" rows="10" cols="80">{{data}}</textarea>
</p>
Hat tip (and +1) to Stewart for pointing out that rows
and cols
are required attributes to textarea
.
You will need to use a <textarea>
with a wrap
attribute. It is not in any HTML standard but to my knowledge the settings "soft", "hard" and "off" work in all major browsers. Definitely in IE. Firefox seems to require a "cols" setting for wrap to work, though.
If you mean that you want your text values to display as multi-lines, use add a white-space: pre;
style to the textarea element, making sure to put put the proper line-breaks into the returned {{data}}
<p>Event Data:
<textarea id="data" rows="10" cols="80">{{data}}</textarea>
</p>
rows and cols are required attributes. Don't ask me why. And if you're going to set the size in CSS, it's generally better to do it in em or % rather than px.