The basic scrolling division is:
HTML Code:
<div style="width:100px;height:200px;overflow:auto;">
Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here. Got some content here.
</div>
Notice the style. By limiting the width and height and setting the overflow to auto, the division's content will be scrollable in one or two dimensions if it overflows the size of the division. These are usually most pleasing when they only scroll vertically, as will this example, unless an incredibly large font size is set in the browser or its content is altered. To virtually ensure vertical scrolling only, all you need to do is be sure that the content in the division can wrap to less than the division's width.
Bookmarks