DHTML Lesson 5 ‘ A Cross Browser Scrollbar
DHTML Lesson 5 ’ A Cross Browser Scrollbar
Now that we have covered all of the basics of dealing with DHTML, both in Netscape and in Internet Explorer, we are ready to get down to the actual business of implementing DHTML.
DHTML can be used to create a variety of interesting and fun effects that can visually enhance your website. This tutorial will cover how to add a cross browser scrollbar to your html page.
First, you will need to get the body of your html page completed. Once that is done, you can begin to add your code for the scrollbar.

First, the var speed is how fast your script will scroll across the page. The higher the number is, the faster the words will scroll. You can play with this setting until you get the desired speed for your page.
The var marquee contents tag refers to the text that you want to scroll across the page.
You can then see the Internet Explorer references for DHTML, with document.all and tags that follow. At the bottom, of the script, you can see the Netscape
If you compare the tags, you can see how the are essentially the same, just optimized for the correct browser.
For example, the style.width=200 and the ilayer width=200, are referring to the same thing, the width of your scrollbar, however, they are simply called by different tags.
Try implementing this script on your page and fine tune the settings until you get the desired effect. You can change the width, the font, the text and the speed until you are happy with the script.
Our next tutorials will cover even more fun effects for your website, as well as how to implement them either in cross browser techniques, or if you prefer, stand alones for either browser.
Related Posts:Posted on 12/27/05 1:37 AM
Be the first to comment!