PDA

View Full Version : scroll bar css


reubenb
12-01-2003, 07:06 AM
can someone please tell me whats wrong with this casading style sheet? everything works but the scroll bar

thanks


a:link
{
{ text-decoration: none }
}
a:visited
{
{ text-decoration: none }
}
a:active
{
{ text-decoration: none }
}
a:hover
{
{ font-weight: bold }
{
body
{
scrollbar-3dlight-color:#999999;
scrollbar-arrow-color #999999;
scrollbar-base-color:#DDDDDD;
scrollbar-darkshadow-color:#999999;
scrollbar-face-color:#DDDDDD;
scrollbar-highlight-color:#DDDDDD;
scrollbar-shadow-color:#DDDDDD;
scrollbar-track-color #CCCCCC;
{

Nightfire
12-01-2003, 07:17 AM
You're lucky any of it works...

a{
text-decoration: none
}

a:hover{
font-weight: bold
}

body{
scrollbar-3dlight-color:#999999;
scrollbar-arrow-color #999999;
scrollbar-base-color:#DDDDDD;
scrollbar-darkshadow-color:#999999;
scrollbar-face-color:#DDDDDD;
scrollbar-highlight-color:#DDDDDD;
scrollbar-shadow-color:#DDDDDD;
scrollbar-track-color #CCCCCC;
}


Try that

reubenb
12-01-2003, 07:27 AM
that still doens't work.

Line: 0 Context : body Property scrollbar-3dlight-color doesn't exist : #999999
is what's given by w3

bazz
12-01-2003, 10:42 AM
Thats because the scrollbar effect that you want is not recognised by the w3c. It is proprietary to M$ browsers.

If you take your first example, just remove the { after the a.hover (or whichever).

it should be like this:

body {
font-family : arial, verdana, sans-serif;
font-size : 10pt;
}

a:hover {
color : #999999;
font-size : 10pt;
}

other element {
specification
}

Of course when I say it should be like this,I dont mean you have to use those specific fonts or sizes - just the format :)

HTH

Bazz

reubenb
12-01-2003, 11:02 AM
hmmm.....
ive got a website but i need all the 'styles' to be in like a css... (attached) can u show me how to do this...

for privacy reasons for this company i had to take all the content out... and make fake ones.. sorry

bazz
12-01-2003, 11:55 AM
I suggest that you take all your style stuff out of the html fikle and put it into an external css file called styles(or something).css Then you can call it to the html file with this line.

<link rel="stylesheet" href="filepath/file.css" type="text/css">

It should follow the format as set out above and you can find out more at w3schools pages (http://www.w3schools.com/css/default.asp)

One tip that i have read about but still havent got around to using is for the likes of links. Where your link, hover, visted and active states are the same, you can lump them into one element (or style). Then for the differences, you can add only those parts to the a:hover (for example).

like this

a:link {
font-family : arial;
font-size : 10pt;
}

a:hover {
color : #888888;
}

a:visited {
color : 000000;
}

get my drift?

hth
bazz

Spudhead
12-01-2003, 02:58 PM
Originally posted by Nightfire

a{
text-decoration: none
}

a:hover{
font-weight: bold
}

body{
scrollbar-3dlight-color:#999999;
scrollbar-arrow-color #999999;
scrollbar-base-color:#DDDDDD;
scrollbar-darkshadow-color:#999999;
scrollbar-face-color:#DDDDDD;
scrollbar-highlight-color:#DDDDDD;
scrollbar-shadow-color:#DDDDDD;
scrollbar-track-color #CCCCCC;
}



Although that should probably be:


a{
text-decoration: none
}

a:hover{
font-weight: bold
}

body{
scrollbar-3dlight-color:#999999;
scrollbar-arrow-color:#999999;
scrollbar-base-color:#DDDDDD;
scrollbar-darkshadow-color:#999999;
scrollbar-face-color:#DDDDDD;
scrollbar-highlight-color:#DDDDDD;
scrollbar-shadow-color:#DDDDDD;
scrollbar-track-color:#CCCCCC;
}


:thumbsup:

brothercake
12-01-2003, 06:22 PM
You're using an XHTML Doctype which puts IE into "standards compliant" (ha!) mode.

That means the canvas is now represented by HTML and not BODY, so you have to apply the scrollbar colors to HTML instead.

me'
12-01-2003, 09:06 PM
Even if you could, I'd want a way to block it. Don't change my UI. It's my scrollbar, leave it alone.

reubenb
12-01-2003, 09:40 PM
yeah i know im using a xhtml dtd but i want it so like,
how do i do the HTML css?
will w3c still accept it?

Skyzyx
12-02-2003, 06:46 AM
No. Changing the colors of the scrollbars is invalid code. The W3C will not validate any code that is incorrect/invalid. You can add the CSS if you want, as it won't hurt anything, but it will not validate.

reubenb
12-02-2003, 06:49 AM
yes
ok
thank
you

glenngv
12-02-2003, 09:21 AM
Originally posted by me'
Even if you could, I'd want a way to block it. Don't change my UI. It's my scrollbar, leave it alone.

So you don't use IE to visit this forum? :D

reubenb
12-02-2003, 09:23 AM
yes, so anyway
what is the real point of w3c validations?

liorean
12-02-2003, 11:17 AM
Originally posted by glenngv
So you don't use IE to visit this forum? :D Well, if I were viewing this forum in iew, I would still not get any coloured scrollbars, so just the fact that they don't show doesn't indicate he's not using iew. (I use the suggested user stylesheet from W3C to eliminate coloured scrollbars.)

me'
12-02-2003, 04:37 PM
Yeah, a couple of changes to my userContent.css file is all it needs to get rid of those scrollbars.

So you don't use IE to visit this forum? :rolleyes: .