View Full Version : scrollbar colors don't work with doctype

01-23-2004, 03:59 AM
The scrollbar colors don't work on my site when i add this to it:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

The page code is this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<META NAME="keywords" CONTENT="pictures...">
<META NAME="description" CONTENT="stuff">
<META NAME="author" CONTENT="me">
<META NAME="generator" CONTENT="NoteTab Light">
<META NAME="copyright" CONTENT="&copy; 2004 me">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">

<link rel="StyleSheet" href="main.css" type="text/css">



<!-- begin main table -->
<table class="tablemain" cellpadding="10" width="750">

<td width="700" height="100">
<center><img width="550" height="100" src="logo1.gif" ALT="logo"></center>

<td height="800">

<!-- end main table -->



but the scrollbars DO work when i have this:


<link rel="StyleSheet" href="sfxmain.css" type="text/css">


css (part of it) :

body {
background: #292929;
font-family: Tahoma, Verdana, sans-serif;
font-size: 10pt;
color: black;
cursor: url(cursorurl.cur);

/* begin scrollbar code */
scrollbar-face-color: silver;
scrollbar-shadow-color: #292929;
scrollbar-highlight-color: #292929;
scrollbar-3dlight-color: #444444;
scrollbar-darkshadow-color: #292929;
scrollbar-track-color: #292929;
scrollbar-arrow-color: #292929;
/* end scrollbar code */


01-23-2004, 06:20 AM
That's because scrollbar coloring is invalid CSS. It's a proprietary hack that was added by Microsoft for Internet Explorer that is a violation of the standards set up by the W3C... the group that invented HTML and such.

It is also considered by many to be a usability and accessibility nightmare. Personally, I think it's bad form for this site to utilize it.

You can either write good clean code, or you can write invalid CSS code for the scrollbars in IE/Win.

This topic has been discussed at great length. Perhaps you should try the search feature next time. :thumbsup:

01-24-2004, 01:22 AM
thanks, and i'll just have to decide if i want clean code or colored scrollbars.

also, why do the scrollbar colors appear when there is no doctype thing?

01-24-2004, 01:39 AM
Im assuming its becuase when you set the doctype you are loading the CSS specification which would not include the invalid CSS.

01-24-2004, 11:32 AM
Originally posted by qwertyuiop
thanks, and i'll just have to decide if i want clean code or colored scrollbars.

also, why do the scrollbar colors appear when there is no doctype thing? On which browser? No DOCTPYE sends IE into 'Quirks-mode', which displays things funnily, and has more bugs than if you include a doctype.

01-24-2004, 12:34 PM
The reason is that the viewport is thecontainer for the body element in quirks mode and the container for the html element in standards mode - and nothing else. Iew does not have better CSS support in standards mode then in quirks mode (with the exception of the box model) it is just less lax in parsing the CSS.

01-25-2004, 02:28 AM
ok, thanks for the background info, all of you ;)