<!DOCTYPE> and CSS Scroll bar

T

The Numerator

Here's the dilemma:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>Text</title>
<link href="styles/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<p>text</p>
</body>
</html>

And in "styles/default.css", I have this:

body {
scrollbar-face-color: #123456
// more scrollbar properties
// ...
}

But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
worked, but the body was all messed up... Could someone tell me whats
going on and a offer a possible alternative? Thanks.
 
K

kchayka

The said:
body {
scrollbar-face-color: #123456

But, the scrollbar doesn't work.

I don't see it as a problem. Thankfully I use a browser that doesn't
support scrollbar styling in the first place. :)

Do your visitors a favor and leave their browser UI alone, eh?
 
S

Stephen Poley

Here's the dilemma:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>Text</title>
<link href="styles/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<p>text</p>
</body>
</html>

And in "styles/default.css", I have this:

body {
scrollbar-face-color: #123456
// more scrollbar properties
// ...
}

But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
worked, but the body was all messed up...

Could someone tell me whats
going on

You're (a) using Internet Explorer and (b) doing something else you
haven't told us.
and a offer a possible alternative?

Two: (1) Opera (2) Firefox.

Oh, and don't bother trying to style scrollbars.
 
C

Carolyn Marenger

The said:
Here's the dilemma:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>Text</title>
<link href="styles/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<p>text</p>
</body>
</html>

And in "styles/default.css", I have this:

body {
scrollbar-face-color: #123456
// more scrollbar properties
// ...
}

But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
worked, but the body was all messed up... Could someone tell me whats
going on and a offer a possible alternative? Thanks.

Please leave my scroll bar alone. It is bad enough when people screw around
with my fonts and try to adjust my window sizes. On the other hand, I have
set my browser to ignore most attempts to control beyond the viewport, so I
am probably immune to your attempts here.

Since I don't want other people manipulating my scroll bar, I haven't tried
to manipulate anyone else's. I can't help you with this one. Good luck!

Carolyn
 
M

Mitja Trampus

The said:
Here's the dilemma:
[snip code]

But, the scrollbar [coloring] doesn't work. Then I took the DOCTYPE off, and it
worked, but the body was all messed up... Could someone tell me whats
going on and a offer a possible alternative? Thanks.

Although I hardly agree with the bickering style of some of the responses you got, they
are in their essence right:
1) don't mess with user's browser
2) use standard css - scrollbar-face-color is not

Number one could be subject to debate, but not being standards-compliant is indeed what's
causing you trouble. If you include the DOCTYPE, browsers try to follow the standards, and
this also means ignoring the scrollbar-face-color directive. If you omit the DOCTYPE,
browsers jump into "quirks mode", allowing non-standard extension, but also behaving
strange in other ways - that's why the rest of the page gets garbled.

See http://www.quirksmode.org/index.html?/css/quirksmode.html for more.
 
D

David E. Ross

The said:
Here's the dilemma:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>Text</title>
<link href="styles/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<p>text</p>
</body>
</html>

And in "styles/default.css", I have this:

body {
scrollbar-face-color: #123456
// more scrollbar properties
// ...
}

But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
worked, but the body was all messed up... Could someone tell me whats
going on and a offer a possible alternative? Thanks.

In plain English, scrollbar-face-color is not a legal style property in
either CSS1 or CSS2.1.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
 
M

Michael Winter

On 26/03/2006 14:38, Mitja Trampus wrote:

[snip]
If you include the DOCTYPE, browsers try to follow the standards,
True.

and this also means ignoring the scrollbar-face-color directive.

That isn't the case for IE, though it would appear to be for Opera.

[snip]

Mike
 
M

Mitja Trampus

Michael said:
On 26/03/2006 14:38, Mitja Trampus wrote:

[snip]
If you include the DOCTYPE, browsers try to follow the standards,
and this also means ignoring the scrollbar-face-color directive.

That isn't the case for IE, though it would appear to be for Opera.

I stand corrected :)
I wrote that without testing it, relying on OT saying that he doesn't get colored
srollbars if he removes the doctype. Apparently he does care about Opera...

I should perhaps also have mentioned that scrollbar-face-color is a no-go with
Firefox/Mozilla/Netscape.
 
D

dwight.stegall

use the html tag in the standards mode instead of the body tag

html {
scrollbar rule goes here
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top