Friday, January 7, 2011

How to Add Scrollbars to Div

Set its dimensions and overflow:auto in its style:
HTML Code:
<div style="width:300px;height:250px;overflow:auto;">  content goes here  </div>
Then if the content is too tall, there will be a vertical scrollbar. If the content is too wide and cannot wrap,
there will be a horizontal scrollbar.

No comments :

Post a Comment