Scrolling Div Tutorial

Scrolling Div

To make a scrolling div, you must specify the height, width, and set the overflow value to "auto".

<style type="text/css">
#scroll {
    height: 100px;
    width: 100px;
    overflow: auto;
}
</style>

<div id="scroll">
    TEXT HERE
</div>

Example

This is a scrolling div layer. This is a scrolling div layer. This is a scrolling div layer.

Customized Scrolling Div

To customize the look of the div, use CSS.

<style type="text/css">
#scroll {
    background-color: #00FF00;
    border-color: #0000FF;
    border-style: solid;
    border-width: 1px;
    color: #000000;
    font-family: sans-serif;
    font-size: 14px;
    padding: 4px;
}
</style>

Check out the "properties" in the CSS Tutorial to further customize your text areas.

Example

This is a scrolling div layer. This is a scrolling div layer. This is a scrolling div layer.

Positioned Scrolling Div

To position a scrolling div, you must also specify the left (or right) and top (or bottom) values and set the position value to "absolute".

<style type="text/css">
#scroll {
    left: 200px;
    top: 0px;
    position: absolute;
}
</style>