Click to See Complete Forum and Search --> : In defense of styled scrollbars


Mr Initial Man
11-25-2005, 12:19 AM
Now, I'm going to touch on a topic every good webdeveloper reacts to as calmly and reasonably as an old woman with a grudge: styled scrollbars. Are they valid CSS? Nope. Are they widely supported? Nope. Will they ever be in the CSS specs? Probably not. Are they bad styling? Yep! Absolutely! No doubt about it! Down with the styled scrollbars of IEvil! They are a blight on any website.

Are they really?

While it is true that scrollbars don't add much to a website, they CAN sometimes keep scrollbars from detracting from a site. Now, if it's a scrollbar that scrolls the body, then, yes, it can stay as is. But what if it's a scrollbar resulting from an overflow:auto; and is right in the middle of a page? When I ran into that, I left it unstyled, and took a look at it afterwards. IT WAS HIDEOUS! It didn't match my design at all! So I broke a few rules, styled the daylights out of it, and called it good.

I guess what I'm saying is, it's true that you shouldn't style the <body> scrollbar. But I think it's okay to style a scrollbar that's contained within your page.

*Puts on extra-strength padding for protection.* What do you guys think?

NogDog
11-25-2005, 12:32 AM
Option 3: Revise your layout and the distribution of content across pages so that you do not need any scrollable blocks within the page. I'm not saying that it's never valid to have such scrollable blocks, but in my opinion a lot of web pages suffer from trying to cram too much content into one page.

Reli4nt
11-26-2005, 10:59 AM
overflow: auto is often a sign that there's just too much crap on one page.

Mr Initial Man
11-26-2005, 11:06 PM
*Uses overflow:auto on his HTML tutorial...*