...

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



qwertyuiop
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"
"http://www.w3.org/TR/html4/loose.dtd">


The page code is this:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>site</title>

<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">

</head>

<body>

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

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

<tr>
<td height="800">
testing...
</td>
</tr>


</table>
<!-- end main table -->

</body>

</html>

but the scrollbars DO work when i have this:


<html>
<head>

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

</head>
<body>
</body>
</html>


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 */

}

Skyzyx
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:
http://www.codingforums.com/showthread.php?s=&threadid=31231
http://www.codingforums.com/showthread.php?s=&threadid=31204
http://www.codingforums.com/showthread.php?s=&threadid=30541
http://www.codingforums.com/showthread.php?s=&threadid=30176
http://www.codingforums.com/showthread.php?s=&threadid=29619
http://www.codingforums.com/showthread.php?s=&threadid=19287

qwertyuiop
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?

missing-score
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.

me'
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.

liorean
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.

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum