On BNET: 7 ways to escape a cell phone contract

Stupid Web Tricks: Create fabulous tropical scroll bars for IE 5.5

Tags: Guest Contributor

  • Save
  • Print
  • Digg This
  • 0

Takeaway: Add pizzazz to your site's right-hand slider.

Click here for our complete list of Stupid Web Tricks.

By Holly Cunningham
(2/23/01)

OK, "fabulous" may be a bit of an overstatement; this trick doesn't actually dole out Mai Tais in flaming volcano-shaped bowls while wearing a midcut top. But it does let you seize control of the defiantly dull and utilitarian right-hand slider that has so long imposed its pallid-but-necessary self beyond your redeeming powers of design. Microsoft has stepped into the breach and allowed you to plant another flag of freedom in unclaimed territory via simple CSS.

Put this code in the <HEAD> of your page:

<STYLE type="text/css"><!--
BODY {
 scrollbar-base-color: color;
 scrollbar-track-color: color;
 scrollbar-face-color: color;
 scrollbar-highlight-color: color;
 scrollbar-3dlight-color: color;
 scrollbar-darkshadow-color: color;
 scrollbar-shadow-color: color;
 scrollbar-arrow-color: color;
 }
--></STYLE>

Scroll bar color anatomy

For each of these properties, replace color with the color name or hex code that you want to use. To the right is an exaggerated diagram of scroll bar color anatomy. The face property fills the arrow buttons and scroll tab. The highlight and shadow properties color their inner edges, while 3dlight and darkshadow color their outer edges. Use arrow to color the arrow buttons' triangles and track for the rest of the scroll bar. If track isn't specified, highlight also colors the mesh pattern in the track area; otherwise the track is monotone. Finally, base fills in track, face, and 3dlight all at once; setting any of them overrides it.

"OK," you're saying to yourself, "is that all there is to a scroll bar?" That's up to you. You can add script to these styles if subtlety is not your thing. IE 5.5 users will notice that the script we used makes this page's scroll bar change colors. The oddly named TriState Rainbow ScrollBar Script by etLux is another example. Or you can take the quiet approach, such as making the track color blend with the page background for a more seamless look or matching everything out to be invisible--save for the arrows.

But before you put on your "CSS Died for My Sins" T-shirt, be aware that so far only Internet Explorer 5.5 supports these CSS properties, which are unashamedly proprietary. You won't find them even in proposed standards. IE refuseniks out there can add it to the "Life's not fair" litany because those who kowtow to Redmond are getting more service goods right now. Way more. Loyalty has its color-scroll-barred rewards.

Our thanks to Chris Gerow for alerting us to this stupid trick.

Holly Cunningham, a frequent contributor to CNET Builder.com, is a freelance Web designer who works primarily to keep her Chihuahua in furs.

  • Save
  • Print
  • Digg This
  • 0

Print/View all Posts Comments on this article

Praise to Holly and her chihuahuawoodrum1@...  | 02/06/06

What do you think?

Article Categories

Security
Security Solutions, IT Locksmith
Networking and Communications
E-mail Administration NetNote, Cisco Routers and Switches
CIO and IT Management
Project Management, CIO Issues, Strategies that Scale
Desktops, Laptops & OS
Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
Data Management
Oracle, SQL Server
Servers
Windows NT, Linux NetNote, Windows Server 2003
Career Development
Geek Trivia
Software/Web Development
Web Development Zone, Visual Basic, .NET

The Green Enterprise

advertisement
Click Here