7 replies [Last post]
smk2007
smk2007's picture
Offline
Enthusiast
Last seen: 8 years 43 weeks ago
Timezone: GMT-8
Joined: 2007-01-04
Posts: 135
Points: 7

Is there not a way to add color to your scroll bars and gradient filters to your site without causing the css to be not compliant?

PVasili
Offline
Regular
Moscow
Last seen: 12 years 8 weeks ago
Moscow
Timezone: GMT+4
Joined: 2007-10-12
Posts: 13
Points: 0

How it should look? (show a

How it should look? (show a picture)

Probably: http://www.cssplay.co.uk/menu/fade_scroll ?

All content management systems suck, Drupal just happens to suck less.
(Boris Mann at DrupalCON Amsterdam, August 2005)

smk2007
smk2007's picture
Offline
Enthusiast
Last seen: 8 years 43 weeks ago
Timezone: GMT-8
Joined: 2007-01-04
Posts: 135
Points: 7

Creating a class for your scrollbar

You know, when you see a colored scroll bar using css. Something like this:

.scrollbar {
SCROLLBAR-FACE-COLOR:#2CB8FB;
SCROLLBAR-HIGHLIGHT-COLOR:#000;
SCROLLBAR-SHADOW-COLOR:#000;
SCROLLBAR-3DLIGHT-COLOR:#2CB8FB;
SCROLLBAR-ARROW-COLOR:#fff;
SCROLLBAR-TRACK-COLOR:#000;
SCROLLBAR-DARKSHADOW-COLOR:#2CB8FB;
}

This type of css is not valid according to the W3C. I was wondering if there is a way to create a colored scroll bar and be valid W3C at the same time. Does anyone know?

PVasili
Offline
Regular
Moscow
Last seen: 12 years 8 weeks ago
Moscow
Timezone: GMT+4
Joined: 2007-10-12
Posts: 13
Points: 0

IE only...

All content management systems suck, Drupal just happens to suck less.
(Boris Mann at DrupalCON Amsterdam, August 2005)

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 48 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Don't mess with such things,

Don't mess with such things, it's proprietary code and never draws much favour from the likes of us. If you have to do this then put the IE only code in Conditional Comments and hide it from the validator, but regardless you can't hide the fact that you are using proprietary code Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

smk2007
smk2007's picture
Offline
Enthusiast
Last seen: 8 years 43 weeks ago
Timezone: GMT-8
Joined: 2007-01-04
Posts: 135
Points: 7

Thanks, one more question.

Thanks for the answer that helps determine how I can hide it or whether to use it at all. I had one more question though about some tranparency code that I've been working with. The interesting thing is, it works great in all browers including: ff, ie7, ie6, mozilla, oprah, ect. but when I try and validate it gives parse errors and doesn't exsist comments. What does that mean when it works in all browsers?

Here is the example. If this shouldn't be used then how would you develop something that used transparency? Javascript perhaps?

div.transOFF { font-weight: bold; color: #fff; width:110px; height:40px; text-align:center; padding: 15px 0 0 0; float:left; position:relative; display:block } div.transON, .current { font-weight: bold; width:110px; color: #000; background: #fff; opacity:.40; filter: alpha(opacity=40); -moz-opacity: 0.5; text-align:center; padding: 15px 0 196px 0; float:left; position:relative; display:block }

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 48 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Your using the developers

Your using the developers testing prefix '-' -moz is a means allowed to browser manufacturers to trial properties without them being part of the core rendering engine? they can be used but are not really meant to be. Opacity is supported by FF now so you should be able to drop the -moz prefix or even shrug and not care; Mozilla seemingly have still not made a decision about display:inline-block and Indeed to use it so have used the -moz-inline-box version, as for validating CSS files, I care little due to the way in which CSS handles errors unlike the html rendering engines, I seldom write invalid CSS syntax when I do it is immediately painfully obvious and corrected.

Validating HTML is the issue as it is forgiving of heinous horrendous markup, CSS is not!

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

smk2007
smk2007's picture
Offline
Enthusiast
Last seen: 8 years 43 weeks ago
Timezone: GMT-8
Joined: 2007-01-04
Posts: 135
Points: 7

Thanks very much..

This was very helpful. Smile