Home
Backup OE
CSS Heading Tags
CSS Text Styles
CSS Background Image
Buttons
Freeware
XP Tips
How Do I
Links
What is New
Laughing Baby
There can be times when adding a scrolling text area on a webpage can be useful. Getting one that is cross browser compatible can be a bit difficult at times, so I hope the instructions below are of use to you.
This one works In IE, Firefox and Opera but I have not tested it in anything else, and you can use html within the box area.
![]() This is an example of a scroll box where contents can be displayed using html.
|
For this box to work correctly, it must be placed within the <td> tag of a Table. |
Below is the code, change the colours and sizes to suit the layout you want.
The Code to display the above scrolling area is:-
This css scroll box has many uses and although it is designed to work within a table, it can also be used within a div tag as below.

This is the Scrolling Area used within a div tag.
<div><class="scroll"><img src="your.jpg" class="right" border=0 width=192 height=80 alt="Logo">
This is the Scrolling Box Area used within a div tag.
</div>
Just change the width, to match your layout, and height setting to whatever you want.
<style type="text/css">
.scroll {
width: 546px;
height: 100px;
padding-left: 5px;
padding-right: 5px;
overflow: auto;
}
</style>
Another simple way to add a scrolling area to your page is by adding a div style tag instead of adding a class to your style sheet, Code is below.
<div style="width: 540px; height: 90px; overflow: auto; padding: 5px;">
using this would produce the box below.
A simple scroll box which can also contain html elements.
The border is created by adding the following into the tag.
border-color: #6699CC; border-width: 1px; border-style: solid;
Another advantage of of using this code is that you can have several scrolling areas of different sizes on your page where you would like them. You could even set a tiled background or fixed size image. Many possibilites are available to you.