SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : DHTML Scrollbars
By Scott Isaacs

We may have gone off the DHTML deep-end with this technique. We found a way to create a real scrollbar in Internet Explorer without requiring any extra controls, images, or fonts. Creating the scrollbar required some creative DHTML scripting and we are still testing to see how well this trick works. If you are running Internet Explorer 4.x, you should see a horizontal scrollbar below:

We will take you through the tricks and techniques used to create this scrollbar. This first step involves how to determine the width of the vertical scrollbar. Since the horizontal scrollbar is always displayed with a vertical scrollbar, we need to account for this space. Furthermore, since this size is determined by the user's system settings, we can't just hardcode a size in.