I am using the following with AngularJS:
<div style="width: 725px; height: 200px;"
data-ng-bind-html-unsafe="question.text"></div>
Is there a way that I can add a scroll to this so that it will accept any size of contents:
Your container (div
) already has a fixed height, so use the css property overflow-y: scroll
. Note that it is not supported in IE < 8.
Use overflow-y
and a fixed height
.
This will add scrolling to the div.
For instance
<div style="width: 725px; height: 200px; overflow-y:scroll;" data-ng-bind-html-unsafe="question.text">
</div>
Hope this helps.